home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2001 September / PC-WELT 9-2001.ISO / software / hw / brennen / flask_src.exe / Audio / MPEG / polyphase.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-06  |  63.4 KB  |  2,127 lines

  1. /* 
  2.  *  polyphase.cpp
  3.  *
  4.  *  Code from
  5.  *            NekoAmp 1.3 decoder by Avery Lee
  6.  *
  7.  *  FlasKMPEG
  8.  *    Copyright (C) Alberto Vigata - January 2000
  9.  *
  10.  *  This file is part of FlasKMPEG, a free MPEG to MPEG/AVI converter
  11.  *    
  12.  *  FlasKMPEG is free software; you can redistribute it and/or modify
  13.  *  it under the terms of the GNU General Public License as published by
  14.  *  the Free Software Foundation; either version 2, or (at your option)
  15.  *  any later version.
  16.  *   
  17.  *  FlasKMPEG is distributed in the hope that it will be useful,
  18.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20.  *  GNU General Public License for more details.
  21.  *   
  22.  *  You should have received a copy of the GNU General Public License
  23.  *  along with GNU Make; see the file COPYING.  If not, write to
  24.  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  25.  *
  26.  */
  27.  
  28.  
  29. #include <math.h>
  30. #include <string.h>
  31. #include <crtdbg.h>
  32. #include <stdio.h>
  33.  
  34. #include "AMPDecoder.h"
  35.  
  36. #define USE_ASM
  37.  
  38.  
  39. static float wincoef[16][32] =
  40. {                /* window coefs */
  41.     {
  42.         0.000000000f, 0.000442505f, -0.003250122f, 0.007003784f,
  43.         -0.031082151f, 0.078628540f, -0.100311279f, 0.572036743f,
  44.         -1.144989014f, -0.572036743f, -0.100311279f, -0.078628540f,
  45.         -0.031082151f, -0.007003784f, -0.003250122f, -0.000442505f,
  46.     },{
  47.         0.000015259f, 0.000473022f, -0.003326416f, 0.007919312f,
  48.         -0.030517576f, 0.084182739f, -0.090927124f, 0.600219727f,
  49.         -1.144287109f, -0.543823242f, -0.108856201f, -0.073059082f,
  50.         -0.031478882f, -0.006118774f, -0.003173828f, -0.000396729f,
  51.     },{
  52.         0.000015259f, 0.000534058f, -0.003387451f, 0.008865356f,
  53.         -0.029785154f, 0.089706421f, -0.080688477f, 0.628295898f,
  54.         -1.142211914f, -0.515609741f, -0.116577141f, -0.067520142f,
  55.         -0.031738281f, -0.005294800f, -0.003082275f, -0.000366211f,
  56.     },{
  57.         0.000015259f, 0.000579834f, -0.003433228f, 0.009841919f,
  58.         -0.028884888f, 0.095169067f, -0.069595337f, 0.656219482f,
  59.         -1.138763428f, -0.487472534f, -0.123474121f, -0.061996460f,
  60.         -0.031845093f, -0.004486084f, -0.002990723f, -0.000320435f,
  61.     },{
  62.         0.000015259f, 0.000625610f, -0.003463745f, 0.010848999f,
  63.         -0.027801514f, 0.100540161f, -0.057617184f, 0.683914185f,
  64.         -1.133926392f, -0.459472656f, -0.129577637f, -0.056533810f,
  65.         -0.031814575f, -0.003723145f, -0.002899170f, -0.000289917f,
  66.     },{
  67.         0.000015259f, 0.000686646f, -0.003479004f, 0.011886597f,
  68.         -0.026535034f, 0.105819702f, -0.044784546f, 0.711318970f,
  69.         -1.127746582f, -0.431655884f, -0.134887695f, -0.051132202f,
  70.         -0.031661987f, -0.003005981f, -0.002792358f, -0.000259399f,
  71.     },{
  72.         0.000015259f, 0.000747681f, -0.003479004f, 0.012939452f,
  73.         -0.025085449f, 0.110946655f, -0.031082151f, 0.738372803f,
  74.         -1.120223999f, -0.404083252f, -0.139450073f, -0.045837402f,
  75.         -0.031387329f, -0.002334595f, -0.002685547f, -0.000244141f,
  76.     },{
  77.         0.000030518f, 0.000808716f, -0.003463745f, 0.014022826f,
  78.         -0.023422241f, 0.115921021f, -0.016510010f, 0.765029907f,
  79.         -1.111373901f, -0.376800537f, -0.143264771f, -0.040634155f,
  80.         -0.031005858f, -0.001693726f, -0.002578735f, -0.000213623f,
  81.     },{
  82.         0.000030518f, 0.000885010f, -0.003417969f, 0.015121460f,
  83.         -0.021575928f, 0.120697014f, -0.001068115f, 0.791213989f,
  84.         -1.101211548f, -0.349868774f, -0.146362305f, -0.035552979f,
  85.         -0.030532837f, -0.001098633f, -0.002456665f, -0.000198364f,
  86.     },{
  87.         0.000030518f, 0.000961304f, -0.003372192f, 0.016235352f,
  88.         -0.019531250f, 0.125259399f, 0.015228271f, 0.816864014f,
  89.         -1.089782715f, -0.323318481f, -0.148773193f, -0.030609131f,
  90.         -0.029937742f, -0.000549316f, -0.002349854f, -0.000167847f,
  91.     },{
  92.         0.000030518f, 0.001037598f, -0.003280640f, 0.017349243f,
  93.         -0.017257690f, 0.129562378f, 0.032379150f, 0.841949463f,
  94.         -1.077117920f, -0.297210693f, -0.150497437f, -0.025817871f,
  95.         -0.029281614f, -0.000030518f, -0.002243042f, -0.000152588f,
  96.     },{
  97.         0.000045776f, 0.001113892f, -0.003173828f, 0.018463135f,
  98.         -0.014801024f, 0.133590698f, 0.050354004f, 0.866363525f,
  99.         -1.063217163f, -0.271591187f, -0.151596069f, -0.021179199f,
  100.         -0.028533936f, 0.000442505f, -0.002120972f, -0.000137329f,
  101.     },{
  102.         0.000045776f, 0.001205444f, -0.003051758f, 0.019577026f,
  103.         -0.012115479f, 0.137298584f, 0.069168091f, 0.890090942f,
  104.         -1.048156738f, -0.246505737f, -0.152069092f, -0.016708374f,
  105.         -0.027725220f, 0.000869751f, -0.002014160f, -0.000122070f,
  106.     },{
  107.         0.000061035f, 0.001296997f, -0.002883911f, 0.020690918f,
  108.         -0.009231566f, 0.140670776f, 0.088775635f, 0.913055420f,
  109.         -1.031936646f, -0.221984863f, -0.151962280f, -0.012420653f,
  110.         -0.026840210f, 0.001266479f, -0.001907349f, -0.000106812f,
  111.     },{
  112.         0.000061035f, 0.001388550f, -0.002700806f, 0.021789551f,
  113.         -0.006134033f, 0.143676758f, 0.109161377f, 0.935195923f,
  114.         -1.014617920f, -0.198059082f, -0.151306152f, -0.008316040f,
  115.         -0.025909424f, 0.001617432f, -0.001785278f, -0.000106812f,
  116.     },{
  117.         0.000076294f, 0.001480103f, -0.002487183f, 0.022857666f,
  118.         -0.002822876f, 0.146255493f, 0.130310059f, 0.956481934f,
  119.         -0.996246338f, -0.174789429f, -0.150115967f, -0.004394531f,
  120.         -0.024932859f, 0.001937866f, -0.001693726f, -0.000091553f,
  121.     }
  122. };
  123.  
  124. static const float wincoef2[]={
  125.     -0.001586914f, -0.023910521f, -0.148422241f, -0.976852417f,
  126.     0.152206421f, 0.000686646f, -0.002227783f, 0.000076294f,
  127. };
  128.  
  129. static const float coef32[31]={    /* 32 pt dct coefs */
  130.     .5006029983604062f,
  131.     .5054709610427671f,
  132.     .5154473132093669f,
  133.     .5310425978615345f,
  134.     .553103908021273f,
  135.     .5829349877738026f,
  136.     .6225041535926976f,
  137.     .674808388163145f,
  138.     .7445363421017894f,
  139.     .8393497548926808f,
  140.     .9725684113484575f,
  141.     1.16944022296938f,
  142.     1.484165144274385f,
  143.     2.057782139240278f,
  144.     3.407611810249888f,
  145.     10.19004086100494f,
  146.     .5024192866920285f,
  147.     .5224986197814337f,
  148.     .5669440502448403f,
  149.     .6468218211965951f,
  150.     .7881547114622637f,
  151.     1.060677908257709f,
  152.     1.722447849872342f,
  153.     5.101156529442028f,
  154.     .5097955811692735f,
  155.     .6013449114834756f,
  156.     .8999763602860835f,
  157.     2.562917284521227f,
  158.     .5411961092767109f,
  159.     1.306563350304716f,
  160.     .7071068387877132f,
  161. };
  162.  
  163. static void __inline forward_bf(int m, int n, const float x[], float f[], const float coef[])
  164. {
  165.     int j, n2;
  166.     int p, q, p0;
  167.     
  168.     n2 = n >> 1;
  169.     for (p0 = 0; p0 < 32; p0 += n) {
  170.         p = p0;
  171.         q = p + n - 1;
  172.         for (j = 0; j < n2; j++, p++, q--)
  173.         {
  174.             f[p] = x[p] + x[q];
  175.             f[n2 + p] = coef[j] * (x[p] - x[q]);
  176.         }
  177.     }
  178. }
  179. /*------------------------------------------------------------*/
  180. static void __inline back_bf(int m, int n, const float x[], float f[])
  181. {
  182.     int j, n2, n21;
  183.     int p, q, p0;
  184.     
  185.     n2 = n >> 1;
  186.     n21 = n2 - 1;
  187.     for (p0 = 0; p0 < 32; p0 += n) {
  188.         p = p0;
  189.         q = p0;
  190.         for (j = 0; j < n2; j++, p += 2, q++)
  191.             f[p] = x[q];
  192.         p = p0 + 1;
  193.         for (j = 0; j < n21; j++, p += 2, q++)
  194.             f[p] = x[q] + x[q + 1];
  195.         f[p] = x[q];
  196.     }
  197. }
  198. /*------------------------------------------------------------*/
  199. void fdct32(float x[], float c[], bool odd, bool invert_odd)
  200. {
  201.     float a[32];            /* ping pong buffers */
  202.     float b[32];
  203.     int p, q;
  204.  
  205.     // special first stage
  206.     // forward_bf(2, 16, a, b, coef32 + 16);
  207.  
  208.     if (invert_odd) {
  209.         q = 15;
  210.         for(p = 0; p < 8; p+=2, q-=2) {
  211.             double a1, a2, a3, a4;
  212.  
  213.             // p: normal, q:inverted.
  214.  
  215.             a1 =  x[p] - x[16+q];
  216.             a2 = -x[q] + x[16+p];
  217.             a3 = (x[p] + x[16+q]) * coef32[p];
  218.             a4 = (-x[q] - x[16+p]) * coef32[q];
  219.  
  220.             b[p   ] =  a1 + a2;
  221.             b[p+ 8] = (a1 - a2) * coef32[16+p];
  222.             b[p+16] =  a3 + a4;
  223.             b[p+24] = (a3 - a4) * coef32[16+p];
  224.  
  225.             // p: inverted, q: normal.
  226.  
  227.             a1 = -x[p+1] + x[15+q];
  228.             a2 =  x[q-1] - x[17+p];
  229.             a3 = (-x[p+1] - x[15+q]) * coef32[p+1];
  230.             a4 = (x[q-1] + x[17+p]) * coef32[q-1];
  231.  
  232.             b[p+ 1] =  a1 + a2;
  233.             b[p+ 9] = (a1 - a2) * coef32[17+p];
  234.             b[p+17] =  a3 + a4;
  235.             b[p+25] = (a3 - a4) * coef32[17+p];
  236.         }
  237.     } else {
  238.         q = 15;
  239.         for(p = 0; p < 8; p++, q--) {
  240.             double a1 =  x[p] + x[16+q];
  241.             double a2 =  x[q] + x[16+p];
  242.             double a3 = (x[p] - x[16+q]) * coef32[p];
  243.             double a4 = (x[q] - x[16+p]) * coef32[q];
  244.  
  245.             b[p   ] =  a1 + a2;
  246.             b[p+ 8] = (a1 - a2) * coef32[16+p];
  247.             b[p+16] =  a3 + a4;
  248.             b[p+24] = (a3 - a4) * coef32[16+p];
  249.         }
  250.     }
  251.  
  252.     forward_bf(4, 8, b, a, coef32 + 16 + 8);
  253.  
  254. //    forward_bf(8, 4, a, b, coef32 + 16 + 8 + 4);
  255. //  forward_bf(16, 2, b, a, coef32 + 16 + 8 + 4 + 2);
  256. //    back_bf(8, 4, a, b);
  257. //    back_bf(4, 8, b, a);
  258. //    back_bf(2, 16, a, b);
  259.     
  260.     for (p = 0; p < 32; p += 16) {
  261.         double a0, a1, a2, a3;
  262.         double b0, b1, b2, b3;
  263.         double d0, d1, d2, d3, d4, d5, d6, d7;
  264.         double d8, d9, dA, dB, dC, dD, dE, dF;
  265.  
  266.         b0 = a[p  ] + a[p+3];
  267.         b1 = a[p+1] + a[p+2];
  268.         b2 = coef32[28] * (a[p  ] - a[p+3]);
  269.         b3 = coef32[29] * (a[p+1] - a[p+2]);
  270.  
  271.         a0 = b0 + b1;
  272.         a1 = coef32[30] * (b0 - b1);
  273.         a2 = b2 + b3;
  274.         a3 = coef32[30] * (b2 - b3);
  275.  
  276.         d0 = a0;
  277.         d1 = a2 + a3;
  278.         d2 = a1;
  279.         d3 = a3;
  280.  
  281.         b0 = a[p+4] + a[p+7];
  282.         b1 = a[p+5] + a[p+6];
  283.         b2 = coef32[28] * (a[p+4] - a[p+7]);
  284.         b3 = coef32[29] * (a[p+5] - a[p+6]);
  285.  
  286.         a0 = b0 + b1;
  287.         a1 = coef32[30] * (b0 - b1);
  288.         a2 = b2 + b3;
  289.         a3 = coef32[30] * (b2 - b3);
  290.  
  291.         d4 = a0;
  292.         d5 = a2 + a3;
  293.         d6 = a1;
  294.         d7 = a3;
  295.  
  296.         b0 = a[p+8] + a[p+11];
  297.         b1 = a[p+9] + a[p+10];
  298.         b2 = coef32[28] * (a[p+8] - a[p+11]);
  299.         b3 = coef32[29] * (a[p+9] - a[p+10]);
  300.  
  301.         a0 = b0 + b1;
  302.         a1 = coef32[30] * (b0 - b1);
  303.         a2 = b2 + b3;
  304.         a3 = coef32[30] * (b2 - b3);
  305.  
  306.         d8 = a0;
  307.         d9 = a2 + a3;
  308.         dA = a1;
  309.         dB = a3;
  310.  
  311.         b0 = a[p+12] + a[p+15];
  312.         b1 = a[p+13] + a[p+14];
  313.         b2 = coef32[28] * (a[p+12] - a[p+15]);
  314.         b3 = coef32[29] * (a[p+13] - a[p+14]);
  315.  
  316.         a0 = b0 + b1;
  317.         a1 = coef32[30] * (b0 - b1);
  318.         a2 = b2 + b3;
  319.         a3 = coef32[30] * (b2 - b3);
  320.  
  321.         dC = a0;
  322.         dD = a2 + a3;
  323.         dE = a1;
  324.         dF = a3;
  325.  
  326.         //////////////////////////////////////////////////
  327.  
  328.         double s1 = dC + dD;
  329.         double s2 = dD + dE;
  330.         double s3 = dE + dF;
  331.  
  332.         a[p   ] = d0;
  333.         a[p+ 2] = d4 + d5;
  334.         a[p+ 4] = d1;
  335.         a[p+ 6] = d5 + d6;
  336.         a[p+ 8] = d2;
  337.         a[p+10] = d6 + d7;
  338.         a[p+12] = d3;
  339.         a[p+14] = d7;
  340.  
  341.         a[p+ 1] = d8 + s1;
  342.         a[p+ 3] = d9 + s1;
  343.         a[p+ 5] = d9 + s2;
  344.         a[p+ 7] = dA + s2;
  345.         a[p+ 9] = dA + s3;
  346.         a[p+11] = dB + s3;
  347.         a[p+13] = dB + dF;
  348.         a[p+15] = dF;
  349.     }
  350.  
  351.  
  352.  
  353. //    back_bf(1, 32, b, c);
  354. //
  355. // reordering for windowing:
  356. //        flip around 256 if odd
  357.  
  358.     if (odd) {
  359.         c[0] = a[0];
  360.         c[512 - 16] = a[16] + a[17];
  361.  
  362.         q = 1;
  363.         for (p = 2; p < 30; p+=2, q++) {
  364.             c[512 - p*16     ] = a[q];
  365.             c[512 - p*16 - 16] = a[q+16] + a[q+17];
  366.         }
  367.  
  368.         c[ 2*16] = a[15];
  369.         c[ 1*16] = a[31];
  370.     } else {
  371.         q = 0;
  372.         for (p = 0; p < 30; p+=2, q++) {
  373.             c[p*16+0 ] = a[q];
  374.             c[p*16+16] = a[q+16] + a[q+17];
  375.         }
  376.  
  377.         c[30*16] = a[15];
  378.         c[31*16] = a[31];
  379.     }
  380. }
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388. #define float_to_long(x) ((converter = (double)(x)+6755399441055744.0),*(long *)&converter)
  389.  
  390. void window_dual(const float vbuf[2][512], int vb_ptr, short *pcm) {
  391.     double converter;
  392.     int i, j;
  393.     int si, bx;
  394.     int coef;
  395.     float *window, *window2;
  396.     float sum1, sum2, sum3, sum4;
  397.     long tmp;
  398.  
  399.     coef = 0;
  400.  
  401. /* first */
  402.  
  403.     i = 0;
  404.     if (vb_ptr & 1) {
  405.             sum1 = 0.0F;
  406.             sum2 = 0.0F;
  407.  
  408.             window = &wincoef[i][(-vb_ptr) & 15];
  409.  
  410.             si = 256-i*16;
  411.  
  412.             sum1 -= window[ 0] * vbuf[0][si+ 0];
  413.             sum2 -= window[ 0] * vbuf[1][si+ 0];
  414.             sum1 += window[ 1] * vbuf[0][si+ 1];
  415.             sum2 += window[ 1] * vbuf[1][si+ 1];
  416.             sum1 -= window[ 2] * vbuf[0][si+ 2];
  417.             sum2 -= window[ 2] * vbuf[1][si+ 2];
  418.             sum1 += window[ 3] * vbuf[0][si+ 3];
  419.             sum2 += window[ 3] * vbuf[1][si+ 3];
  420.             sum1 -= window[ 4] * vbuf[0][si+ 4];
  421.             sum2 -= window[ 4] * vbuf[1][si+ 4];
  422.             sum1 += window[ 5] * vbuf[0][si+ 5];
  423.             sum2 += window[ 5] * vbuf[1][si+ 5];
  424.             sum1 -= window[ 6] * vbuf[0][si+ 6];
  425.             sum2 -= window[ 6] * vbuf[1][si+ 6];
  426.             sum1 += window[ 7] * vbuf[0][si+ 7];
  427.             sum2 += window[ 7] * vbuf[1][si+ 7];
  428.             sum1 -= window[ 8] * vbuf[0][si+ 8];
  429.             sum2 -= window[ 8] * vbuf[1][si+ 8];
  430.             sum1 += window[ 9] * vbuf[0][si+ 9];
  431.             sum2 += window[ 9] * vbuf[1][si+ 9];
  432.             sum1 -= window[10] * vbuf[0][si+10];
  433.             sum2 -= window[10] * vbuf[1][si+10];
  434.             sum1 += window[11] * vbuf[0][si+11];
  435.             sum2 += window[11] * vbuf[1][si+11];
  436.             sum1 -= window[12] * vbuf[0][si+12];
  437.             sum2 -= window[12] * vbuf[1][si+12];
  438.             sum1 += window[13] * vbuf[0][si+13];
  439.             sum2 += window[13] * vbuf[1][si+13];
  440.             sum1 -= window[14] * vbuf[0][si+14];
  441.             sum2 -= window[14] * vbuf[1][si+14];
  442.             sum1 += window[15] * vbuf[0][si+15];
  443.             sum2 += window[15] * vbuf[1][si+15];
  444.  
  445.             tmp = float_to_long(sum1);
  446.             if (tmp > 32767)
  447.                 tmp = 32767;
  448.             else if (tmp < -32768)
  449.                 tmp = -32768;
  450.  
  451.             pcm[i*2] = tmp;
  452.  
  453.             tmp = float_to_long(sum2);
  454.             if (tmp > 32767)
  455.                 tmp = 32767;
  456.             else if (tmp < -32768)
  457.                 tmp = -32768;
  458.  
  459.             pcm[i*2+1] = tmp;
  460.     } else {
  461.             sum1 = 0.0F;
  462.             sum2 = 0.0F;
  463.  
  464.             window = &wincoef[i][(-vb_ptr) & 15];
  465.  
  466.             si = 256+i*16;
  467.  
  468.             sum1 += window[ 0] * vbuf[0][si+ 0];
  469.             sum2 += window[ 0] * vbuf[1][si+ 0];
  470.             sum1 -= window[ 1] * vbuf[0][si+ 1];
  471.             sum2 -= window[ 1] * vbuf[1][si+ 1];
  472.             sum1 += window[ 2] * vbuf[0][si+ 2];
  473.             sum2 += window[ 2] * vbuf[1][si+ 2];
  474.             sum1 -= window[ 3] * vbuf[0][si+ 3];
  475.             sum2 -= window[ 3] * vbuf[1][si+ 3];
  476.             sum1 += window[ 4] * vbuf[0][si+ 4];
  477.             sum2 += window[ 4] * vbuf[1][si+ 4];
  478.             sum1 -= window[ 5] * vbuf[0][si+ 5];
  479.             sum2 -= window[ 5] * vbuf[1][si+ 5];
  480.             sum1 += window[ 6] * vbuf[0][si+ 6];
  481.             sum2 += window[ 6] * vbuf[1][si+ 6];
  482.             sum1 -= window[ 7] * vbuf[0][si+ 7];
  483.             sum2 -= window[ 7] * vbuf[1][si+ 7];
  484.             sum1 += window[ 8] * vbuf[0][si+ 8];
  485.             sum2 += window[ 8] * vbuf[1][si+ 8];
  486.             sum1 -= window[ 9] * vbuf[0][si+ 9];
  487.             sum2 -= window[ 9] * vbuf[1][si+ 9];
  488.             sum1 += window[10] * vbuf[0][si+10];
  489.             sum2 += window[10] * vbuf[1][si+10];
  490.             sum1 -= window[11] * vbuf[0][si+11];
  491.             sum2 -= window[11] * vbuf[1][si+11];
  492.             sum1 += window[12] * vbuf[0][si+12];
  493.             sum2 += window[12] * vbuf[1][si+12];
  494.             sum1 -= window[13] * vbuf[0][si+13];
  495.             sum2 -= window[13] * vbuf[1][si+13];
  496.             sum1 += window[14] * vbuf[0][si+14];
  497.             sum2 += window[14] * vbuf[1][si+14];
  498.             sum1 -= window[15] * vbuf[0][si+15];
  499.             sum2 -= window[15] * vbuf[1][si+15];
  500.  
  501.             tmp = float_to_long(sum1);
  502.             if (tmp > 32767)
  503.                 tmp = 32767;
  504.             else if (tmp < -32768)
  505.                 tmp = -32768;
  506.  
  507.             pcm[i*2] = tmp;
  508.  
  509.             tmp = float_to_long(sum2);
  510.             if (tmp > 32767)
  511.                 tmp = 32767;
  512.             else if (tmp < -32768)
  513.                 tmp = -32768;
  514.  
  515.             pcm[i*2+1] = tmp;
  516.     }
  517.  
  518. /*-- 1-16, last 15 --*/
  519.  
  520.     if (vb_ptr & 1) {
  521. #ifdef USE_ASM
  522.         window = &wincoef[1][16-vb_ptr];
  523.         window2 = &wincoef[1][vb_ptr];
  524.  
  525.         const void *vbuf2 = (void *)&vbuf[0][240];
  526.  
  527.         __asm {
  528.             push    esi
  529.             push    vbuf2
  530.             mov        ecx,window
  531.             mov        edx,window2
  532.             mov        ebx,pcm
  533.             pop        esi
  534.             push    edi
  535.             mov        edi,ebx
  536.             add        ebx,2*2
  537.             add        edi,62*2
  538.             push    ebp
  539.             push    0
  540.             push    0
  541.             push    0
  542.             push    0
  543.             mov        ebp,15
  544.  
  545.             ;ESI = FP input
  546.             ;EBX = PCM output (low)
  547.             ;ECX = window
  548.             ;EDX = window2
  549.             ;EDI = PCM output (high)
  550.             ;EBP = counter
  551.             ;
  552.             ;A sum = window[0...15] * vbuf[0]
  553.             ;B sum = window2[15...0] * vbuf[0]
  554.             ;C sum = window[0...15] * vbuf[1]
  555.             ;D sum = window2[15...0] * vbuf[1]
  556.  
  557. div0_loop:
  558.             fld        dword ptr [esi+15*4+0*2048]    ;Lx
  559.             fmul    dword ptr [ecx+15*4]        ;Ax
  560.             fld        dword ptr [esi+15*4+0*2048]    ;Lx Ax
  561.             fmul    dword ptr [edx+ 0*4]        ;Bx Ax
  562.             fld        dword ptr [esi+15*4+1*2048]    ;Rx Bx Ax
  563.             fmul    dword ptr [ecx+15*4]        ;Cx Bx Ax
  564.             fld        dword ptr [esi+15*4+1*2048]    ;Rx Cx Bx Ax
  565.             fmul    dword ptr [edx+ 0*4]        ;Dx Cx Bx Ax
  566.  
  567.             fld        dword ptr [esi+14*4+0*2048]    ;Lx Dt Ct Bt At
  568.             fmul    dword ptr [ecx+14*4]        ;Ax Dt Ct Bt At
  569.             fld        dword ptr [esi+14*4+0*2048]    ;Lx Ax Dt Ct Bt At
  570.             fmul    dword ptr [edx+ 1*4]        ;Bx Ax Dt Ct Bt At
  571.             fld        dword ptr [esi+14*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  572.             fmul    dword ptr [ecx+14*4]        ;Cx Bx Ax Dt Ct Bt At
  573.             fld        dword ptr [esi+14*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  574.             fmul    dword ptr [edx+ 1*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  575.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  576.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  577.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  578.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  579.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  580.             faddp    st(1),st                    ;Dt Ct Bt At
  581.  
  582.             fld        dword ptr [esi+13*4+0*2048]    ;Lx Dt Ct Bt At
  583.             fmul    dword ptr [ecx+13*4]        ;Ax Dt Ct Bt At
  584.             fld        dword ptr [esi+13*4+0*2048]    ;Lx Ax Dt Ct Bt At
  585.             fmul    dword ptr [edx+ 2*4]        ;Bx Ax Dt Ct Bt At
  586.             fld        dword ptr [esi+13*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  587.             fmul    dword ptr [ecx+13*4]        ;Cx Bx Ax Dt Ct Bt At
  588.             fld        dword ptr [esi+13*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  589.             fmul    dword ptr [edx+ 2*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  590.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  591.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  592.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  593.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  594.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  595.             faddp    st(1),st                    ;Dt Ct Bt At
  596.  
  597.             fld        dword ptr [esi+12*4+0*2048]    ;Lx Dt Ct Bt At
  598.             fmul    dword ptr [ecx+12*4]        ;Ax Dt Ct Bt At
  599.             fld        dword ptr [esi+12*4+0*2048]    ;Lx Ax Dt Ct Bt At
  600.             fmul    dword ptr [edx+ 3*4]        ;Bx Ax Dt Ct Bt At
  601.             fld        dword ptr [esi+12*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  602.             fmul    dword ptr [ecx+12*4]        ;Cx Bx Ax Dt Ct Bt At
  603.             fld        dword ptr [esi+12*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  604.             fmul    dword ptr [edx+ 3*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  605.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  606.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  607.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  608.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  609.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  610.             faddp    st(1),st                    ;Dt Ct Bt At
  611.  
  612.             fld        dword ptr [esi+11*4+0*2048]    ;Lx Dt Ct Bt At
  613.             fmul    dword ptr [ecx+11*4]        ;Ax Dt Ct Bt At
  614.             fld        dword ptr [esi+11*4+0*2048]    ;Lx Ax Dt Ct Bt At
  615.             fmul    dword ptr [edx+ 4*4]        ;Bx Ax Dt Ct Bt At
  616.             fld        dword ptr [esi+11*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  617.             fmul    dword ptr [ecx+11*4]        ;Cx Bx Ax Dt Ct Bt At
  618.             fld        dword ptr [esi+11*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  619.             fmul    dword ptr [edx+ 4*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  620.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  621.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  622.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  623.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  624.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  625.             faddp    st(1),st                    ;Dt Ct Bt At
  626.  
  627.             fld        dword ptr [esi+10*4+0*2048]    ;Lx Dt Ct Bt At
  628.             fmul    dword ptr [ecx+10*4]        ;Ax Dt Ct Bt At
  629.             fld        dword ptr [esi+10*4+0*2048]    ;Lx Ax Dt Ct Bt At
  630.             fmul    dword ptr [edx+ 5*4]        ;Bx Ax Dt Ct Bt At
  631.             fld        dword ptr [esi+10*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  632.             fmul    dword ptr [ecx+10*4]        ;Cx Bx Ax Dt Ct Bt At
  633.             fld        dword ptr [esi+10*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  634.             fmul    dword ptr [edx+ 5*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  635.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  636.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  637.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  638.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  639.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  640.             faddp    st(1),st                    ;Dt Ct Bt At
  641.  
  642.             fld        dword ptr [esi+ 9*4+0*2048]    ;Lx Dt Ct Bt At
  643.             fmul    dword ptr [ecx+ 9*4]        ;Ax Dt Ct Bt At
  644.             fld        dword ptr [esi+ 9*4+0*2048]    ;Lx Ax Dt Ct Bt At
  645.             fmul    dword ptr [edx+ 6*4]        ;Bx Ax Dt Ct Bt At
  646.             fld        dword ptr [esi+ 9*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  647.             fmul    dword ptr [ecx+ 9*4]        ;Cx Bx Ax Dt Ct Bt At
  648.             fld        dword ptr [esi+ 9*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  649.             fmul    dword ptr [edx+ 6*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  650.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  651.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  652.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  653.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  654.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  655.             faddp    st(1),st                    ;Dt Ct Bt At
  656.  
  657.             fld        dword ptr [esi+ 8*4+0*2048]    ;Lx Dt Ct Bt At
  658.             fmul    dword ptr [ecx+ 8*4]        ;Ax Dt Ct Bt At
  659.             fld        dword ptr [esi+ 8*4+0*2048]    ;Lx Ax Dt Ct Bt At
  660.             fmul    dword ptr [edx+ 7*4]        ;Bx Ax Dt Ct Bt At
  661.             fld        dword ptr [esi+ 8*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  662.             fmul    dword ptr [ecx+ 8*4]        ;Cx Bx Ax Dt Ct Bt At
  663.             fld        dword ptr [esi+ 8*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  664.             fmul    dword ptr [edx+ 7*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  665.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  666.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  667.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  668.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  669.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  670.             faddp    st(1),st                    ;Dt Ct Bt At
  671.  
  672.             fld        dword ptr [esi+ 7*4+0*2048]    ;Lx Dt Ct Bt At
  673.             fmul    dword ptr [ecx+ 7*4]        ;Ax Dt Ct Bt At
  674.             fld        dword ptr [esi+ 7*4+0*2048]    ;Lx Ax Dt Ct Bt At
  675.             fmul    dword ptr [edx+ 8*4]        ;Bx Ax Dt Ct Bt At
  676.             fld        dword ptr [esi+ 7*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  677.             fmul    dword ptr [ecx+ 7*4]        ;Cx Bx Ax Dt Ct Bt At
  678.             fld        dword ptr [esi+ 7*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  679.             fmul    dword ptr [edx+ 8*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  680.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  681.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  682.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  683.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  684.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  685.             faddp    st(1),st                    ;Dt Ct Bt At
  686.  
  687.             fld        dword ptr [esi+ 6*4+0*2048]    ;Lx Dt Ct Bt At
  688.             fmul    dword ptr [ecx+ 6*4]        ;Ax Dt Ct Bt At
  689.             fld        dword ptr [esi+ 6*4+0*2048]    ;Lx Ax Dt Ct Bt At
  690.             fmul    dword ptr [edx+ 9*4]        ;Bx Ax Dt Ct Bt At
  691.             fld        dword ptr [esi+ 6*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  692.             fmul    dword ptr [ecx+ 6*4]        ;Cx Bx Ax Dt Ct Bt At
  693.             fld        dword ptr [esi+ 6*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  694.             fmul    dword ptr [edx+ 9*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  695.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  696.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  697.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  698.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  699.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  700.             faddp    st(1),st                    ;Dt Ct Bt At
  701.  
  702.             fld        dword ptr [esi+ 5*4+0*2048]    ;Lx Dt Ct Bt At
  703.             fmul    dword ptr [ecx+ 5*4]        ;Ax Dt Ct Bt At
  704.             fld        dword ptr [esi+ 5*4+0*2048]    ;Lx Ax Dt Ct Bt At
  705.             fmul    dword ptr [edx+10*4]        ;Bx Ax Dt Ct Bt At
  706.             fld        dword ptr [esi+ 5*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  707.             fmul    dword ptr [ecx+ 5*4]        ;Cx Bx Ax Dt Ct Bt At
  708.             fld        dword ptr [esi+ 5*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  709.             fmul    dword ptr [edx+10*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  710.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  711.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  712.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  713.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  714.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  715.             faddp    st(1),st                    ;Dt Ct Bt At
  716.  
  717.             fld        dword ptr [esi+ 4*4+0*2048]    ;Lx Dt Ct Bt At
  718.             fmul    dword ptr [ecx+ 4*4]        ;Ax Dt Ct Bt At
  719.             fld        dword ptr [esi+ 4*4+0*2048]    ;Lx Ax Dt Ct Bt At
  720.             fmul    dword ptr [edx+11*4]        ;Bx Ax Dt Ct Bt At
  721.             fld        dword ptr [esi+ 4*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  722.             fmul    dword ptr [ecx+ 4*4]        ;Cx Bx Ax Dt Ct Bt At
  723.             fld        dword ptr [esi+ 4*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  724.             fmul    dword ptr [edx+11*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  725.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  726.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  727.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  728.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  729.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  730.             faddp    st(1),st                    ;Dt Ct Bt At
  731.  
  732.             fld        dword ptr [esi+ 3*4+0*2048]    ;Lx Dt Ct Bt At
  733.             fmul    dword ptr [ecx+ 3*4]        ;Ax Dt Ct Bt At
  734.             fld        dword ptr [esi+ 3*4+0*2048]    ;Lx Ax Dt Ct Bt At
  735.             fmul    dword ptr [edx+12*4]        ;Bx Ax Dt Ct Bt At
  736.             fld        dword ptr [esi+ 3*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  737.             fmul    dword ptr [ecx+ 3*4]        ;Cx Bx Ax Dt Ct Bt At
  738.             fld        dword ptr [esi+ 3*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  739.             fmul    dword ptr [edx+12*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  740.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  741.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  742.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  743.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  744.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  745.             faddp    st(1),st                    ;Dt Ct Bt At
  746.  
  747.             fld        dword ptr [esi+ 2*4+0*2048]    ;Lx Dt Ct Bt At
  748.             fmul    dword ptr [ecx+ 2*4]        ;Ax Dt Ct Bt At
  749.             fld        dword ptr [esi+ 2*4+0*2048]    ;Lx Ax Dt Ct Bt At
  750.             fmul    dword ptr [edx+13*4]        ;Bx Ax Dt Ct Bt At
  751.             fld        dword ptr [esi+ 2*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  752.             fmul    dword ptr [ecx+ 2*4]        ;Cx Bx Ax Dt Ct Bt At
  753.             fld        dword ptr [esi+ 2*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  754.             fmul    dword ptr [edx+13*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  755.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  756.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  757.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  758.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  759.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  760.             faddp    st(1),st                    ;Dt Ct Bt At
  761.  
  762.             fld        dword ptr [esi+ 1*4+0*2048]    ;Lx Dt Ct Bt At
  763.             fmul    dword ptr [ecx+ 1*4]        ;Ax Dt Ct Bt At
  764.             fld        dword ptr [esi+ 1*4+0*2048]    ;Lx Ax Dt Ct Bt At
  765.             fmul    dword ptr [edx+14*4]        ;Bx Ax Dt Ct Bt At
  766.             fld        dword ptr [esi+ 1*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  767.             fmul    dword ptr [ecx+ 1*4]        ;Cx Bx Ax Dt Ct Bt At
  768.             fld        dword ptr [esi+ 1*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  769.             fmul    dword ptr [edx+14*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  770.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  771.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  772.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  773.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  774.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  775.             faddp    st(1),st                    ;Dt Ct Bt At
  776.  
  777.             fld        dword ptr [esi+ 0*4+0*2048]    ;Lx Dt Ct Bt At
  778.             fmul    dword ptr [ecx+ 0*4]        ;Ax Dt Ct Bt At
  779.             fld        dword ptr [esi+ 0*4+0*2048]    ;Lx Ax Dt Ct Bt At
  780.             fmul    dword ptr [edx+15*4]        ;Bx Ax Dt Ct Bt At
  781.             fld        dword ptr [esi+ 0*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  782.             fmul    dword ptr [ecx+ 0*4]        ;Cx Bx Ax Dt Ct Bt At
  783.             fld        dword ptr [esi+ 0*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  784.             fmul    dword ptr [edx+15*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  785.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  786.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  787.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  788.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  789.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  790.             faddp    st(1),st                    ;Dt Ct Bt At
  791.  
  792.             add        ecx,32*4
  793.             add        edx,32*4
  794.             sub        esi,16*4
  795.  
  796.             fistp    dword ptr [esp+12]            ;[esp+8] = Dt
  797.             fistp    dword ptr [esp+8]            ;[esp+12] = Ct
  798.             fistp    dword ptr [esp+4]            ;[esp+0] = Bt
  799.             fistp    dword ptr [esp+0]            ;[esp+4] = At
  800.  
  801.             mov        eax,[esp+4]
  802.             cmp        eax,-32768
  803.             jge        div0_noclip1low
  804.             mov        eax,-32768
  805. div0_noclip1low:
  806.             cmp        eax,32767
  807.             jle        div0_noclip1high
  808.             mov        eax,32767
  809. div0_noclip1high:
  810.             mov        [edi],ax
  811.  
  812.             mov        eax,[esp+12]
  813.             cmp        eax,-32768
  814.             jge        div0_noclip3low
  815.             mov        eax,-32768
  816. div0_noclip3low:
  817.             cmp        eax,32767
  818.             jle        div0_noclip3high
  819.             mov        eax,32767
  820. div0_noclip3high:
  821.             mov        [edi+2],ax
  822.  
  823.  
  824.             mov        eax,[esp+0]
  825.             cmp        eax,-32768
  826.             jge        div0_noclip2low
  827.             mov        eax,-32768
  828. div0_noclip2low:
  829.             cmp        eax,32767
  830.             jle        div0_noclip2high
  831.             mov        eax,32767
  832. div0_noclip2high:
  833.             mov        [ebx],ax
  834.             nop
  835.  
  836.             mov        eax,[esp+8]
  837.             cmp        eax,-32768
  838.             jge        div0_noclip4low
  839.             mov        eax,-32768
  840. div0_noclip4low:
  841.             cmp        eax,32767
  842.             jle        div0_noclip4high
  843.             mov        eax,32767
  844. div0_noclip4high:
  845.             mov        [ebx+2],ax
  846.             nop
  847.  
  848.  
  849.             add        ebx,4
  850.             sub        edi,4
  851.  
  852.             dec        ebp
  853.             jne        div0_loop
  854.             pop        eax
  855.             pop        eax
  856.             pop        eax
  857.             pop        eax
  858.             pop        ebp
  859.  
  860.             pop        edi
  861.             mov        ebx,esi
  862.             pop        esi
  863. ;            mov        window,ecx
  864. ;            mov        window2,edx
  865. ;            mov        u_ptr,ebx
  866.         };
  867. #else
  868.         for (i = 1; i < 16; i++) {
  869.             sum1 = 0.0F;
  870.             sum2 = 0.0F;
  871.             sum3 = 0.0F;
  872.             sum4 = 0.0F;
  873.  
  874.             window = &wincoef[i][16-vb_ptr];
  875.             window2 = &wincoef[i][vb_ptr];
  876.  
  877.             si = 256-i*16;
  878.  
  879.             sum1 -= window [ 0] * vbuf[0][si+ 0];
  880.             sum2 += window2[15] * vbuf[0][si+ 0];
  881.             sum3 -= window [ 0] * vbuf[1][si+ 0];
  882.             sum4 += window2[15] * vbuf[1][si+ 0];
  883.             sum1 += window [ 1] * vbuf[0][si+ 1];
  884.             sum2 += window2[14] * vbuf[0][si+ 1];
  885.             sum3 += window [ 1] * vbuf[1][si+ 1];
  886.             sum4 += window2[14] * vbuf[1][si+ 1];
  887.             sum1 -= window [ 2] * vbuf[0][si+ 2];
  888.             sum2 += window2[13] * vbuf[0][si+ 2];
  889.             sum3 -= window [ 2] * vbuf[1][si+ 2];
  890.             sum4 += window2[13] * vbuf[1][si+ 2];
  891.             sum1 += window [ 3] * vbuf[0][si+ 3];
  892.             sum2 += window2[12] * vbuf[0][si+ 3];
  893.             sum3 += window [ 3] * vbuf[1][si+ 3];
  894.             sum4 += window2[12] * vbuf[1][si+ 3];
  895.             sum1 -= window [ 4] * vbuf[0][si+ 4];
  896.             sum2 += window2[11] * vbuf[0][si+ 4];
  897.             sum3 -= window [ 4] * vbuf[1][si+ 4];
  898.             sum4 += window2[11] * vbuf[1][si+ 4];
  899.             sum1 += window [ 5] * vbuf[0][si+ 5];
  900.             sum2 += window2[10] * vbuf[0][si+ 5];
  901.             sum3 += window [ 5] * vbuf[1][si+ 5];
  902.             sum4 += window2[10] * vbuf[1][si+ 5];
  903.             sum1 -= window [ 6] * vbuf[0][si+ 6];
  904.             sum2 += window2[ 9] * vbuf[0][si+ 6];
  905.             sum3 -= window [ 6] * vbuf[1][si+ 6];
  906.             sum4 += window2[ 9] * vbuf[1][si+ 6];
  907.             sum1 += window [ 7] * vbuf[0][si+ 7];
  908.             sum2 += window2[ 8] * vbuf[0][si+ 7];
  909.             sum3 += window [ 7] * vbuf[1][si+ 7];
  910.             sum4 += window2[ 8] * vbuf[1][si+ 7];
  911.             sum1 -= window [ 8] * vbuf[0][si+ 8];
  912.             sum2 += window2[ 7] * vbuf[0][si+ 8];
  913.             sum3 -= window [ 8] * vbuf[1][si+ 8];
  914.             sum4 += window2[ 7] * vbuf[1][si+ 8];
  915.             sum1 += window [ 9] * vbuf[0][si+ 9];
  916.             sum2 += window2[ 6] * vbuf[0][si+ 9];
  917.             sum3 += window [ 9] * vbuf[1][si+ 9];
  918.             sum4 += window2[ 6] * vbuf[1][si+ 9];
  919.             sum1 -= window [10] * vbuf[0][si+10];
  920.             sum2 += window2[ 5] * vbuf[0][si+10];
  921.             sum3 -= window [10] * vbuf[1][si+10];
  922.             sum4 += window2[ 5] * vbuf[1][si+10];
  923.             sum1 += window [11] * vbuf[0][si+11];
  924.             sum2 += window2[ 4] * vbuf[0][si+11];
  925.             sum3 += window [11] * vbuf[1][si+11];
  926.             sum4 += window2[ 4] * vbuf[1][si+11];
  927.             sum1 -= window [12] * vbuf[0][si+12];
  928.             sum2 += window2[ 3] * vbuf[0][si+12];
  929.             sum3 -= window [12] * vbuf[1][si+12];
  930.             sum4 += window2[ 3] * vbuf[1][si+12];
  931.             sum1 += window [13] * vbuf[0][si+13];
  932.             sum2 += window2[ 2] * vbuf[0][si+13];
  933.             sum3 += window [13] * vbuf[1][si+13];
  934.             sum4 += window2[ 2] * vbuf[1][si+13];
  935.             sum1 -= window [14] * vbuf[0][si+14];
  936.             sum2 += window2[ 1] * vbuf[0][si+14];
  937.             sum3 -= window [14] * vbuf[1][si+14];
  938.             sum4 += window2[ 1] * vbuf[1][si+14];
  939.             sum1 += window [15] * vbuf[0][si+15];
  940.             sum2 += window2[ 0] * vbuf[0][si+15];
  941.             sum3 += window [15] * vbuf[1][si+15];
  942.             sum4 += window2[ 0] * vbuf[1][si+15];
  943.  
  944.             tmp = float_to_long(sum1);
  945.             if (tmp > 32767)
  946.                 tmp = 32767;
  947.             else if (tmp < -32768)
  948.                 tmp = -32768;
  949.  
  950.             pcm[i*2] = tmp;
  951.  
  952.             tmp = float_to_long(sum3);
  953.             if (tmp > 32767)
  954.                 tmp = 32767;
  955.             else if (tmp < -32768)
  956.                 tmp = -32768;
  957.  
  958.             pcm[i*2+1] = tmp;
  959.  
  960.  
  961.             tmp = float_to_long(sum2);
  962.             if (tmp > 32767)
  963.                 tmp = 32767;
  964.             else if (tmp < -32768)
  965.                 tmp = -32768;
  966.  
  967.             pcm[64-i*2] = tmp;
  968.  
  969.             tmp = float_to_long(sum4);
  970.             if (tmp > 32767)
  971.                 tmp = 32767;
  972.             else if (tmp < -32768)
  973.                 tmp = -32768;
  974.  
  975.             pcm[64-i*2+1] = tmp;
  976.         }
  977. #endif
  978.     } else {
  979. #ifdef USE_ASM
  980.         window = &wincoef[1][16-vb_ptr];
  981.         window2 = &wincoef[1][vb_ptr];
  982.  
  983.         const void *vbuf2 = (void *)&vbuf[0][272];
  984.  
  985.         __asm {
  986.             push    esi
  987.             push    vbuf2
  988.             mov        ecx,window
  989.             mov        edx,window2
  990.             mov        ebx,pcm
  991.             pop        esi
  992.             push    edi
  993.             mov        edi,ebx
  994.             add        ebx,2*2
  995.             add        edi,62*2
  996.             push    ebp
  997.             push    0
  998.             push    0
  999.             push    0
  1000.             push    0
  1001.             mov        ebp,15
  1002.  
  1003.             ;ESI = FP input
  1004.             ;EBX = PCM output (low)
  1005.             ;ECX = window
  1006.             ;EDX = window2
  1007.             ;EDI = PCM output (high)
  1008.             ;EBP = counter
  1009.             ;
  1010.             ;A sum = window[0...15] * vbuf[0] (alternating)
  1011.             ;B sum = window2[15...0] * vbuf[0]
  1012.             ;C sum = window[0...15] * vbuf[1] (alternating)
  1013.             ;D sum = window2[15...0] * vbuf[1]
  1014.  
  1015. div1_loop:
  1016.             fld        dword ptr [esi+ 0*4+0*2048]    ;Lx
  1017.             fmul    dword ptr [ecx+ 0*4]        ;Ax
  1018.             fld        dword ptr [esi+ 0*4+0*2048]    ;Lx Ax
  1019.             fmul    dword ptr [edx+15*4]        ;Bx Ax
  1020.             fld        dword ptr [esi+ 0*4+1*2048]    ;Rx Bx Ax
  1021.             fmul    dword ptr [ecx+ 0*4]        ;Cx Bx Ax
  1022.             fld        dword ptr [esi+ 0*4+1*2048]    ;Rx Cx Bx Ax
  1023.             fmul    dword ptr [edx+15*4]        ;Dx Cx Bx Ax
  1024.  
  1025.             fld        dword ptr [esi+ 1*4+0*2048]    ;Lx Dt Ct Bt At
  1026.             fmul    dword ptr [ecx+ 1*4]        ;Ax Dt Ct Bt At
  1027.             fld        dword ptr [esi+ 1*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1028.             fmul    dword ptr [edx+14*4]        ;Bx Ax Dt Ct Bt At
  1029.             fld        dword ptr [esi+ 1*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1030.             fmul    dword ptr [ecx+ 1*4]        ;Cx Bx Ax Dt Ct Bt At
  1031.             fld        dword ptr [esi+ 1*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1032.             fmul    dword ptr [edx+14*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1033.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1034.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1035.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1036.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1037.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  1038.             faddp    st(1),st                    ;Dt Ct Bt At
  1039.  
  1040.             fld        dword ptr [esi+ 2*4+0*2048]    ;Lx Dt Ct Bt At
  1041.             fmul    dword ptr [ecx+ 2*4]        ;Ax Dt Ct Bt At
  1042.             fld        dword ptr [esi+ 2*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1043.             fmul    dword ptr [edx+13*4]        ;Bx Ax Dt Ct Bt At
  1044.             fld        dword ptr [esi+ 2*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1045.             fmul    dword ptr [ecx+ 2*4]        ;Cx Bx Ax Dt Ct Bt At
  1046.             fld        dword ptr [esi+ 2*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1047.             fmul    dword ptr [edx+13*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1048.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1049.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1050.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1051.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1052.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  1053.             faddp    st(1),st                    ;Dt Ct Bt At
  1054.  
  1055.             fld        dword ptr [esi+ 3*4+0*2048]    ;Lx Dt Ct Bt At
  1056.             fmul    dword ptr [ecx+ 3*4]        ;Ax Dt Ct Bt At
  1057.             fld        dword ptr [esi+ 3*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1058.             fmul    dword ptr [edx+12*4]        ;Bx Ax Dt Ct Bt At
  1059.             fld        dword ptr [esi+ 3*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1060.             fmul    dword ptr [ecx+ 3*4]        ;Cx Bx Ax Dt Ct Bt At
  1061.             fld        dword ptr [esi+ 3*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1062.             fmul    dword ptr [edx+12*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1063.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1064.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1065.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1066.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1067.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  1068.             faddp    st(1),st                    ;Dt Ct Bt At
  1069.  
  1070.             fld        dword ptr [esi+ 4*4+0*2048]    ;Lx Dt Ct Bt At
  1071.             fmul    dword ptr [ecx+ 4*4]        ;Ax Dt Ct Bt At
  1072.             fld        dword ptr [esi+ 4*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1073.             fmul    dword ptr [edx+11*4]        ;Bx Ax Dt Ct Bt At
  1074.             fld        dword ptr [esi+ 4*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1075.             fmul    dword ptr [ecx+ 4*4]        ;Cx Bx Ax Dt Ct Bt At
  1076.             fld        dword ptr [esi+ 4*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1077.             fmul    dword ptr [edx+11*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1078.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1079.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1080.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1081.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1082.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  1083.             faddp    st(1),st                    ;Dt Ct Bt At
  1084.  
  1085.             fld        dword ptr [esi+ 5*4+0*2048]    ;Lx Dt Ct Bt At
  1086.             fmul    dword ptr [ecx+ 5*4]        ;Ax Dt Ct Bt At
  1087.             fld        dword ptr [esi+ 5*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1088.             fmul    dword ptr [edx+10*4]        ;Bx Ax Dt Ct Bt At
  1089.             fld        dword ptr [esi+ 5*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1090.             fmul    dword ptr [ecx+ 5*4]        ;Cx Bx Ax Dt Ct Bt At
  1091.             fld        dword ptr [esi+ 5*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1092.             fmul    dword ptr [edx+10*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1093.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1094.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1095.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1096.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1097.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  1098.             faddp    st(1),st                    ;Dt Ct Bt At
  1099.  
  1100.             fld        dword ptr [esi+ 6*4+0*2048]    ;Lx Dt Ct Bt At
  1101.             fmul    dword ptr [ecx+ 6*4]        ;Ax Dt Ct Bt At
  1102.             fld        dword ptr [esi+ 6*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1103.             fmul    dword ptr [edx+ 9*4]        ;Bx Ax Dt Ct Bt At
  1104.             fld        dword ptr [esi+ 6*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1105.             fmul    dword ptr [ecx+ 6*4]        ;Cx Bx Ax Dt Ct Bt At
  1106.             fld        dword ptr [esi+ 6*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1107.             fmul    dword ptr [edx+ 9*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1108.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1109.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1110.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1111.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1112.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  1113.             faddp    st(1),st                    ;Dt Ct Bt At
  1114.  
  1115.             fld        dword ptr [esi+ 7*4+0*2048]    ;Lx Dt Ct Bt At
  1116.             fmul    dword ptr [ecx+ 7*4]        ;Ax Dt Ct Bt At
  1117.             fld        dword ptr [esi+ 7*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1118.             fmul    dword ptr [edx+ 8*4]        ;Bx Ax Dt Ct Bt At
  1119.             fld        dword ptr [esi+ 7*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1120.             fmul    dword ptr [ecx+ 7*4]        ;Cx Bx Ax Dt Ct Bt At
  1121.             fld        dword ptr [esi+ 7*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1122.             fmul    dword ptr [edx+ 8*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1123.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1124.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1125.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1126.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1127.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  1128.             faddp    st(1),st                    ;Dt Ct Bt At
  1129.  
  1130.             fld        dword ptr [esi+ 8*4+0*2048]    ;Lx Dt Ct Bt At
  1131.             fmul    dword ptr [ecx+ 8*4]        ;Ax Dt Ct Bt At
  1132.             fld        dword ptr [esi+ 8*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1133.             fmul    dword ptr [edx+ 7*4]        ;Bx Ax Dt Ct Bt At
  1134.             fld        dword ptr [esi+ 8*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1135.             fmul    dword ptr [ecx+ 8*4]        ;Cx Bx Ax Dt Ct Bt At
  1136.             fld        dword ptr [esi+ 8*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1137.             fmul    dword ptr [edx+ 7*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1138.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1139.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1140.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1141.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1142.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  1143.             faddp    st(1),st                    ;Dt Ct Bt At
  1144.  
  1145.             fld        dword ptr [esi+ 9*4+0*2048]    ;Lx Dt Ct Bt At
  1146.             fmul    dword ptr [ecx+ 9*4]        ;Ax Dt Ct Bt At
  1147.             fld        dword ptr [esi+ 9*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1148.             fmul    dword ptr [edx+ 6*4]        ;Bx Ax Dt Ct Bt At
  1149.             fld        dword ptr [esi+ 9*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1150.             fmul    dword ptr [ecx+ 9*4]        ;Cx Bx Ax Dt Ct Bt At
  1151.             fld        dword ptr [esi+ 9*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1152.             fmul    dword ptr [edx+ 6*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1153.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1154.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1155.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1156.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1157.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  1158.             faddp    st(1),st                    ;Dt Ct Bt At
  1159.  
  1160.             fld        dword ptr [esi+10*4+0*2048]    ;Lx Dt Ct Bt At
  1161.             fmul    dword ptr [ecx+10*4]        ;Ax Dt Ct Bt At
  1162.             fld        dword ptr [esi+10*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1163.             fmul    dword ptr [edx+ 5*4]        ;Bx Ax Dt Ct Bt At
  1164.             fld        dword ptr [esi+10*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1165.             fmul    dword ptr [ecx+10*4]        ;Cx Bx Ax Dt Ct Bt At
  1166.             fld        dword ptr [esi+10*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1167.             fmul    dword ptr [edx+ 5*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1168.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1169.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1170.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1171.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1172.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  1173.             faddp    st(1),st                    ;Dt Ct Bt At
  1174.  
  1175.             fld        dword ptr [esi+11*4+0*2048]    ;Lx Dt Ct Bt At
  1176.             fmul    dword ptr [ecx+11*4]        ;Ax Dt Ct Bt At
  1177.             fld        dword ptr [esi+11*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1178.             fmul    dword ptr [edx+ 4*4]        ;Bx Ax Dt Ct Bt At
  1179.             fld        dword ptr [esi+11*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1180.             fmul    dword ptr [ecx+11*4]        ;Cx Bx Ax Dt Ct Bt At
  1181.             fld        dword ptr [esi+11*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1182.             fmul    dword ptr [edx+ 4*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1183.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1184.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1185.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1186.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1187.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  1188.             faddp    st(1),st                    ;Dt Ct Bt At
  1189.  
  1190.             fld        dword ptr [esi+12*4+0*2048]    ;Lx Dt Ct Bt At
  1191.             fmul    dword ptr [ecx+12*4]        ;Ax Dt Ct Bt At
  1192.             fld        dword ptr [esi+12*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1193.             fmul    dword ptr [edx+ 3*4]        ;Bx Ax Dt Ct Bt At
  1194.             fld        dword ptr [esi+12*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1195.             fmul    dword ptr [ecx+12*4]        ;Cx Bx Ax Dt Ct Bt At
  1196.             fld        dword ptr [esi+12*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1197.             fmul    dword ptr [edx+ 3*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1198.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1199.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1200.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1201.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1202.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  1203.             faddp    st(1),st                    ;Dt Ct Bt At
  1204.  
  1205.             fld        dword ptr [esi+13*4+0*2048]    ;Lx Dt Ct Bt At
  1206.             fmul    dword ptr [ecx+13*4]        ;Ax Dt Ct Bt At
  1207.             fld        dword ptr [esi+13*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1208.             fmul    dword ptr [edx+ 2*4]        ;Bx Ax Dt Ct Bt At
  1209.             fld        dword ptr [esi+13*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1210.             fmul    dword ptr [ecx+13*4]        ;Cx Bx Ax Dt Ct Bt At
  1211.             fld        dword ptr [esi+13*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1212.             fmul    dword ptr [edx+ 2*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1213.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1214.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1215.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1216.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1217.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  1218.             faddp    st(1),st                    ;Dt Ct Bt At
  1219.  
  1220.             fld        dword ptr [esi+14*4+0*2048]    ;Lx Dt Ct Bt At
  1221.             fmul    dword ptr [ecx+14*4]        ;Ax Dt Ct Bt At
  1222.             fld        dword ptr [esi+14*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1223.             fmul    dword ptr [edx+ 1*4]        ;Bx Ax Dt Ct Bt At
  1224.             fld        dword ptr [esi+14*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1225.             fmul    dword ptr [ecx+14*4]        ;Cx Bx Ax Dt Ct Bt At
  1226.             fld        dword ptr [esi+14*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1227.             fmul    dword ptr [edx+ 1*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1228.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1229.             faddp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1230.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1231.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1232.             faddp    st(3),st                    ;Dx Dt Ct Bt At
  1233.             faddp    st(1),st                    ;Dt Ct Bt At
  1234.  
  1235.             fld        dword ptr [esi+15*4+0*2048]    ;Lx Dt Ct Bt At
  1236.             fmul    dword ptr [ecx+15*4]        ;Ax Dt Ct Bt At
  1237.             fld        dword ptr [esi+15*4+0*2048]    ;Lx Ax Dt Ct Bt At
  1238.             fmul    dword ptr [edx+ 0*4]        ;Bx Ax Dt Ct Bt At
  1239.             fld        dword ptr [esi+15*4+1*2048]    ;Rx Bx Ax Dt Ct Bt At
  1240.             fmul    dword ptr [ecx+15*4]        ;Cx Bx Ax Dt Ct Bt At
  1241.             fld        dword ptr [esi+15*4+1*2048]    ;Rx Cx Bx Ax Dt Ct Bt At
  1242.             fmul    dword ptr [edx+ 0*4]        ;Dx Cx Bx Ax Dt Ct Bt At
  1243.             fxch    st(3)                        ;Ax Cx Bx Dx Dt Ct Bt At
  1244.             fsubp    st(7),st                    ;Cx Bx Dx Dt Ct Bt At
  1245.             fxch    st(1)                        ;Bx Cx Dx Dt Ct Bt At
  1246.             faddp    st(5),st                    ;Cx Dx Dt Ct Bt At
  1247.             fsubp    st(3),st                    ;Dx Dt Ct Bt At
  1248.             faddp    st(1),st                    ;Dt Ct Bt At
  1249.  
  1250.             add        ecx,32*4
  1251.             add        edx,32*4
  1252.             add        esi,16*4
  1253.  
  1254.             fistp    dword ptr [esp+12]            ;[esp+8] = Dt
  1255.             fistp    dword ptr [esp+8]            ;[esp+12] = Ct
  1256.             fistp    dword ptr [esp+4]            ;[esp+0] = Bt
  1257.             fistp    dword ptr [esp+0]            ;[esp+4] = At
  1258.  
  1259.             mov        eax,[esp+4]
  1260.             cmp        eax,-32768
  1261.             jge        div1_noclip1low
  1262.             mov        eax,-32768
  1263. div1_noclip1low:
  1264.             cmp        eax,32767
  1265.             jle        div1_noclip1high
  1266.             mov        eax,32767
  1267. div1_noclip1high:
  1268.             mov        [edi],ax
  1269.  
  1270.             mov        eax,[esp+12]
  1271.             cmp        eax,-32768
  1272.             jge        div1_noclip3low
  1273.             mov        eax,-32768
  1274. div1_noclip3low:
  1275.             cmp        eax,32767
  1276.             jle        div1_noclip3high
  1277.             mov        eax,32767
  1278. div1_noclip3high:
  1279.             mov        [edi+2],ax
  1280.  
  1281.  
  1282.             mov        eax,[esp+0]
  1283.             cmp        eax,-32768
  1284.             jge        div1_noclip2low
  1285.             mov        eax,-32768
  1286. div1_noclip2low:
  1287.             cmp        eax,32767
  1288.             jle        div1_noclip2high
  1289.             mov        eax,32767
  1290. div1_noclip2high:
  1291.             mov        [ebx],ax
  1292.             nop
  1293.  
  1294.             mov        eax,[esp+8]
  1295.             cmp        eax,-32768
  1296.             jge        div1_noclip4low
  1297.             mov        eax,-32768
  1298. div1_noclip4low:
  1299.             cmp        eax,32767
  1300.             jle        div1_noclip4high
  1301.             mov        eax,32767
  1302. div1_noclip4high:
  1303.             mov        [ebx+2],ax
  1304.             nop
  1305.  
  1306.  
  1307.             add        ebx,4
  1308.             sub        edi,4
  1309.  
  1310.             dec        ebp
  1311.             jne        div1_loop
  1312.             pop        eax
  1313.             pop        eax
  1314.             pop        eax
  1315.             pop        eax
  1316.             pop        ebp
  1317.  
  1318.             pop        edi
  1319.             mov        ebx,esi
  1320.             pop        esi
  1321. ;            mov        window,ecx
  1322. ;            mov        window2,edx
  1323. ;            mov        u_ptr,ebx
  1324.         };
  1325. #else
  1326.         for (i = 1; i < 16; i++) {
  1327.             sum1 = 0.0F;
  1328.             sum2 = 0.0F;
  1329.             sum3 = 0.0F;
  1330.             sum4 = 0.0F;
  1331.  
  1332.             window = &wincoef[i][16-vb_ptr];
  1333.             window2 = &wincoef[i][vb_ptr & 15];
  1334.  
  1335.             si = 256+i*16;
  1336.  
  1337.             sum1 += window [ 0] * vbuf[0][si+ 0];
  1338.             sum2 += window2[15] * vbuf[0][si+ 0];
  1339.             sum3 += window [ 0] * vbuf[1][si+ 0];
  1340.             sum4 += window2[15] * vbuf[1][si+ 0];
  1341.             sum1 -= window [ 1] * vbuf[0][si+ 1];
  1342.             sum2 += window2[14] * vbuf[0][si+ 1];
  1343.             sum3 -= window [ 1] * vbuf[1][si+ 1];
  1344.             sum4 += window2[14] * vbuf[1][si+ 1];
  1345.             sum1 += window [ 2] * vbuf[0][si+ 2];
  1346.             sum2 += window2[13] * vbuf[0][si+ 2];
  1347.             sum3 += window [ 2] * vbuf[1][si+ 2];
  1348.             sum4 += window2[13] * vbuf[1][si+ 2];
  1349.             sum1 -= window [ 3] * vbuf[0][si+ 3];
  1350.             sum2 += window2[12] * vbuf[0][si+ 3];
  1351.             sum3 -= window [ 3] * vbuf[1][si+ 3];
  1352.             sum4 += window2[12] * vbuf[1][si+ 3];
  1353.             sum1 += window [ 4] * vbuf[0][si+ 4];
  1354.             sum2 += window2[11] * vbuf[0][si+ 4];
  1355.             sum3 += window [ 4] * vbuf[1][si+ 4];
  1356.             sum4 += window2[11] * vbuf[1][si+ 4];
  1357.             sum1 -= window [ 5] * vbuf[0][si+ 5];
  1358.             sum2 += window2[10] * vbuf[0][si+ 5];
  1359.             sum3 -= window [ 5] * vbuf[1][si+ 5];
  1360.             sum4 += window2[10] * vbuf[1][si+ 5];
  1361.             sum1 += window [ 6] * vbuf[0][si+ 6];
  1362.             sum2 += window2[ 9] * vbuf[0][si+ 6];
  1363.             sum3 += window [ 6] * vbuf[1][si+ 6];
  1364.             sum4 += window2[ 9] * vbuf[1][si+ 6];
  1365.             sum1 -= window [ 7] * vbuf[0][si+ 7];
  1366.             sum2 += window2[ 8] * vbuf[0][si+ 7];
  1367.             sum3 -= window [ 7] * vbuf[1][si+ 7];
  1368.             sum4 += window2[ 8] * vbuf[1][si+ 7];
  1369.             sum1 += window [ 8] * vbuf[0][si+ 8];
  1370.             sum2 += window2[ 7] * vbuf[0][si+ 8];
  1371.             sum3 += window [ 8] * vbuf[1][si+ 8];
  1372.             sum4 += window2[ 7] * vbuf[1][si+ 8];
  1373.             sum1 -= window [ 9] * vbuf[0][si+ 9];
  1374.             sum2 += window2[ 6] * vbuf[0][si+ 9];
  1375.             sum3 -= window [ 9] * vbuf[1][si+ 9];
  1376.             sum4 += window2[ 6] * vbuf[1][si+ 9];
  1377.             sum1 += window [10] * vbuf[0][si+10];
  1378.             sum2 += window2[ 5] * vbuf[0][si+10];
  1379.             sum3 += window [10] * vbuf[1][si+10];
  1380.             sum4 += window2[ 5] * vbuf[1][si+10];
  1381.             sum1 -= window [11] * vbuf[0][si+11];
  1382.             sum2 += window2[ 4] * vbuf[0][si+11];
  1383.             sum3 -= window [11] * vbuf[1][si+11];
  1384.             sum4 += window2[ 4] * vbuf[1][si+11];
  1385.             sum1 += window [12] * vbuf[0][si+12];
  1386.             sum2 += window2[ 3] * vbuf[0][si+12];
  1387.             sum3 += window [12] * vbuf[1][si+12];
  1388.             sum4 += window2[ 3] * vbuf[1][si+12];
  1389.             sum1 -= window [13] * vbuf[0][si+13];
  1390.             sum2 += window2[ 2] * vbuf[0][si+13];
  1391.             sum3 -= window [13] * vbuf[1][si+13];
  1392.             sum4 += window2[ 2] * vbuf[1][si+13];
  1393.             sum1 += window [14] * vbuf[0][si+14];
  1394.             sum2 += window2[ 1] * vbuf[0][si+14];
  1395.             sum3 += window [14] * vbuf[1][si+14];
  1396.             sum4 += window2[ 1] * vbuf[1][si+14];
  1397.             sum1 -= window [15] * vbuf[0][si+15];
  1398.             sum2 += window2[ 0] * vbuf[0][si+15];
  1399.             sum3 -= window [15] * vbuf[1][si+15];
  1400.             sum4 += window2[ 0] * vbuf[1][si+15];
  1401.  
  1402.             tmp = float_to_long(sum1);
  1403.             if (tmp > 32767)
  1404.                 tmp = 32767;
  1405.             else if (tmp < -32768)
  1406.                 tmp = -32768;
  1407.  
  1408.             pcm[i*2] = tmp;
  1409.  
  1410.             tmp = float_to_long(sum3);
  1411.             if (tmp > 32767)
  1412.                 tmp = 32767;
  1413.             else if (tmp < -32768)
  1414.                 tmp = -32768;
  1415.  
  1416.             pcm[i*2+1] = tmp;
  1417.         
  1418.  
  1419.             tmp = float_to_long(sum2);
  1420.             if (tmp > 32767)
  1421.                 tmp = 32767;
  1422.             else if (tmp < -32768)
  1423.                 tmp = -32768;
  1424.  
  1425.             pcm[64-i*2] = tmp;
  1426.         
  1427.             tmp = float_to_long(sum4);
  1428.             if (tmp > 32767)
  1429.                 tmp = 32767;
  1430.             else if (tmp < -32768)
  1431.                 tmp = -32768;
  1432.  
  1433.             pcm[64-i*2+1] = tmp;
  1434.         
  1435.         }
  1436. #endif
  1437.     }
  1438.  
  1439.  
  1440.  
  1441.     /*--  special case --*/
  1442.     coef = 0;
  1443.     bx = (vb_ptr+1)&15;
  1444.  
  1445.     sum1 = sum2 = 0.0F;
  1446.  
  1447.     for (j = 0; j < 8; j++) {
  1448.         sum1 += wincoef2[coef] * vbuf[0][bx];
  1449.         sum2 += wincoef2[coef] * vbuf[1][bx];    bx = (bx+2)&15;
  1450.         ++coef;
  1451.     }
  1452.  
  1453.     tmp = (long)sum1;
  1454.  
  1455.     if (tmp > 32767)
  1456.         tmp = 32767;
  1457.     else if (tmp < -32768)
  1458.         tmp = -32768;
  1459.     pcm[32] = tmp;
  1460.  
  1461.     tmp = (long)sum2;
  1462.  
  1463.     if (tmp > 32767)
  1464.         tmp = 32767;
  1465.     else if (tmp < -32768)
  1466.         tmp = -32768;
  1467.     pcm[33] = tmp;
  1468. }
  1469.  
  1470. void window_mono(const float *vbuf, int vb_ptr, short *pcm) {
  1471.     double converter;
  1472.     int i, j;
  1473.     int si, bx;
  1474.     int coef;
  1475.     float *window, *window2;
  1476.     float sum1, sum2;
  1477.     long tmp;
  1478.  
  1479.     coef = 0;
  1480.  
  1481. /* first */
  1482.  
  1483.     i = 0;
  1484.     if (vb_ptr & 1) {
  1485.             sum1 = 0.0F;
  1486.  
  1487.             window = &wincoef[i][(-vb_ptr) & 15];
  1488.  
  1489.             si = 256-i*16;
  1490.  
  1491.             sum1 -= window[ 0] * vbuf[si+ 0];
  1492.             sum1 += window[ 1] * vbuf[si+ 1];
  1493.             sum1 -= window[ 2] * vbuf[si+ 2];
  1494.             sum1 += window[ 3] * vbuf[si+ 3];
  1495.             sum1 -= window[ 4] * vbuf[si+ 4];
  1496.             sum1 += window[ 5] * vbuf[si+ 5];
  1497.             sum1 -= window[ 6] * vbuf[si+ 6];
  1498.             sum1 += window[ 7] * vbuf[si+ 7];
  1499.             sum1 -= window[ 8] * vbuf[si+ 8];
  1500.             sum1 += window[ 9] * vbuf[si+ 9];
  1501.             sum1 -= window[10] * vbuf[si+10];
  1502.             sum1 += window[11] * vbuf[si+11];
  1503.             sum1 -= window[12] * vbuf[si+12];
  1504.             sum1 += window[13] * vbuf[si+13];
  1505.             sum1 -= window[14] * vbuf[si+14];
  1506.             sum1 += window[15] * vbuf[si+15];
  1507.  
  1508.             tmp = float_to_long(sum1);
  1509.             if (tmp > 32767)
  1510.                 tmp = 32767;
  1511.             else if (tmp < -32768)
  1512.                 tmp = -32768;
  1513.  
  1514.             pcm[i] = tmp;
  1515.     } else {
  1516.             sum1 = 0.0F;
  1517.  
  1518.             window = &wincoef[i][(-vb_ptr) & 15];
  1519.  
  1520.             si = 256+i*16;
  1521.  
  1522.             sum1 += window[ 0] * vbuf[si+ 0];
  1523.             sum1 -= window[ 1] * vbuf[si+ 1];
  1524.             sum1 += window[ 2] * vbuf[si+ 2];
  1525.             sum1 -= window[ 3] * vbuf[si+ 3];
  1526.             sum1 += window[ 4] * vbuf[si+ 4];
  1527.             sum1 -= window[ 5] * vbuf[si+ 5];
  1528.             sum1 += window[ 6] * vbuf[si+ 6];
  1529.             sum1 -= window[ 7] * vbuf[si+ 7];
  1530.             sum1 += window[ 8] * vbuf[si+ 8];
  1531.             sum1 -= window[ 9] * vbuf[si+ 9];
  1532.             sum1 += window[10] * vbuf[si+10];
  1533.             sum1 -= window[11] * vbuf[si+11];
  1534.             sum1 += window[12] * vbuf[si+12];
  1535.             sum1 -= window[13] * vbuf[si+13];
  1536.             sum1 += window[14] * vbuf[si+14];
  1537.             sum1 -= window[15] * vbuf[si+15];
  1538.  
  1539.             tmp = float_to_long(sum1);
  1540.             if (tmp > 32767)
  1541.                 tmp = 32767;
  1542.             else if (tmp < -32768)
  1543.                 tmp = -32768;
  1544.  
  1545.             pcm[i] = tmp;
  1546.     }
  1547.  
  1548. /*-- 1-16, last 15 --*/
  1549.  
  1550.     if (vb_ptr & 1) {
  1551. #ifdef USE_ASM
  1552.         window = &wincoef[1][16-vb_ptr];
  1553.         window2 = &wincoef[1][vb_ptr];
  1554.  
  1555.         const float *vbuf2 = vbuf+240;
  1556.  
  1557.         __asm {
  1558.             push    esi
  1559.             push    vbuf2
  1560.             mov        edx,window
  1561.             mov        ecx,window2
  1562.             mov        ebx,pcm
  1563.             pop        esi
  1564.             push    edi
  1565.             mov        edi,ebx
  1566.             add        ebx,2
  1567.             add        edi,62
  1568.             cmp        eax,2
  1569.             push    ebp
  1570.             push    0
  1571.             push    0
  1572.             mov        ebp,15
  1573. div0_loop:
  1574.             fld        dword ptr [esi+ 0*4]    ;x0
  1575.             fmul    dword ptr [ecx+15*4]    ;A0
  1576.             fld        dword ptr [esi+ 0*4]    ;x0 A0
  1577.             fmul    dword ptr [edx+ 0*4]    ;B0 A0
  1578.             fld        dword ptr [esi+ 1*4]    ;x1 B0 A0
  1579.             fmul    dword ptr [ecx+14*4]    ;A1 B0 A0
  1580.             fld        dword ptr [esi+ 1*4]    ;x1 A1 B0 A0
  1581.             fmul    dword ptr [edx+ 1*4]    ;B1 A1 B0 A0
  1582.             fld        dword ptr [esi+ 2*4]    ;x2 B1 A1 B0 A0
  1583.             fxch    st(2)                    ;A1 B1 x2 B0 A0
  1584.             faddp    st(4),st                ;B1 x2 B0 At
  1585.             fsubp    st(2),st                ;x2 Bt At
  1586.             fmul    dword ptr [ecx+13*4]    ;A2 Bt At
  1587.             fld        dword ptr [esi+ 2*4]    ;x2 A2 Bt At
  1588.             fmul    dword ptr [edx+ 2*4]    ;B2 A2 Bt At
  1589.  
  1590.             fld        dword ptr [esi+ 3*4]    ;x3 B2 A2 Bt At
  1591.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1592.             faddp    st(4),st                ;B2 x3 Bt At
  1593.             faddp    st(2),st                ;x3 Bt At
  1594.             fmul    dword ptr [ecx+12*4]    ;A3 Bt At
  1595.             fld        dword ptr [esi+ 3*4]    ;x3 A3 Bt At
  1596.             fmul    dword ptr [edx+ 3*4]    ;B3 A3 Bt At
  1597.  
  1598.             fld        dword ptr [esi+ 4*4]    ;x3 B2 A2 Bt At
  1599.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1600.             faddp    st(4),st                ;B2 x3 Bt At
  1601.             fsubp    st(2),st                ;x3 Bt At
  1602.             fmul    dword ptr [ecx+11*4]    ;A3 Bt At
  1603.             fld        dword ptr [esi+ 4*4]    ;x3 A3 Bt At
  1604.             fmul    dword ptr [edx+ 4*4]    ;B3 A3 Bt At
  1605.  
  1606.             fld        dword ptr [esi+ 5*4]    ;x3 B2 A2 Bt At
  1607.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1608.             faddp    st(4),st                ;B2 x3 Bt At
  1609.             faddp    st(2),st                ;x3 Bt At
  1610.             fmul    dword ptr [ecx+10*4]    ;A3 Bt At
  1611.             fld        dword ptr [esi+ 5*4]    ;x3 A3 Bt At
  1612.             fmul    dword ptr [edx+ 5*4]    ;B3 A3 Bt At
  1613.  
  1614.             fld        dword ptr [esi+ 6*4]    ;x3 B2 A2 Bt At
  1615.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1616.             faddp    st(4),st                ;B2 x3 Bt At
  1617.             fsubp    st(2),st                ;x3 Bt At
  1618.             fmul    dword ptr [ecx+ 9*4]    ;A3 Bt At
  1619.             fld        dword ptr [esi+ 6*4]    ;x3 A3 Bt At
  1620.             fmul    dword ptr [edx+ 6*4]    ;B3 A3 Bt At
  1621.  
  1622.             fld        dword ptr [esi+ 7*4]    ;x3 B2 A2 Bt At
  1623.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1624.             faddp    st(4),st                ;B2 x3 Bt At
  1625.             faddp    st(2),st                ;x3 Bt At
  1626.             fmul    dword ptr [ecx+ 8*4]    ;A3 Bt At
  1627.             fld        dword ptr [esi+ 7*4]    ;x3 A3 Bt At
  1628.             fmul    dword ptr [edx+ 7*4]    ;B3 A3 Bt At
  1629.  
  1630.             fld        dword ptr [esi+ 8*4]    ;x3 B2 A2 Bt At
  1631.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1632.             faddp    st(4),st                ;B2 x3 Bt At
  1633.             fsubp    st(2),st                ;x3 Bt At
  1634.             fmul    dword ptr [ecx+ 7*4]    ;A3 Bt At
  1635.             fld        dword ptr [esi+ 8*4]    ;x3 A3 Bt At
  1636.             fmul    dword ptr [edx+ 8*4]    ;B3 A3 Bt At
  1637.  
  1638.             fld        dword ptr [esi+ 9*4]    ;x3 B2 A2 Bt At
  1639.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1640.             faddp    st(4),st                ;B2 x3 Bt At
  1641.             faddp    st(2),st                ;x3 Bt At
  1642.             fmul    dword ptr [ecx+ 6*4]    ;A3 Bt At
  1643.             fld        dword ptr [esi+ 9*4]    ;x3 A3 Bt At
  1644.             fmul    dword ptr [edx+ 9*4]    ;B3 A3 Bt At
  1645.  
  1646.             fld        dword ptr [esi+10*4]    ;x3 B2 A2 Bt At
  1647.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1648.             faddp    st(4),st                ;B2 x3 Bt At
  1649.             fsubp    st(2),st                ;x3 Bt At
  1650.             fmul    dword ptr [ecx+ 5*4]    ;A3 Bt At
  1651.             fld        dword ptr [esi+10*4]    ;x3 A3 Bt At
  1652.             fmul    dword ptr [edx+10*4]    ;B3 A3 Bt At
  1653.  
  1654.             fld        dword ptr [esi+11*4]    ;x3 B2 A2 Bt At
  1655.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1656.             faddp    st(4),st                ;B2 x3 Bt At
  1657.             faddp    st(2),st                ;x3 Bt At
  1658.             fmul    dword ptr [ecx+ 4*4]    ;A3 Bt At
  1659.             fld        dword ptr [esi+11*4]    ;x3 A3 Bt At
  1660.             fmul    dword ptr [edx+11*4]    ;B3 A3 Bt At
  1661.  
  1662.             fld        dword ptr [esi+12*4]    ;x3 B2 A2 Bt At
  1663.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1664.             faddp    st(4),st                ;B2 x3 Bt At
  1665.             fsubp    st(2),st                ;x3 Bt At
  1666.             fmul    dword ptr [ecx+ 3*4]    ;A3 Bt At
  1667.             fld        dword ptr [esi+12*4]    ;x3 A3 Bt At
  1668.             fmul    dword ptr [edx+12*4]    ;B3 A3 Bt At
  1669.  
  1670.             fld        dword ptr [esi+13*4]    ;x3 B2 A2 Bt At
  1671.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1672.             faddp    st(4),st                ;B2 x3 Bt At
  1673.             faddp    st(2),st                ;x3 Bt At
  1674.             fmul    dword ptr [ecx+ 2*4]    ;A3 Bt At
  1675.             fld        dword ptr [esi+13*4]    ;x3 A3 Bt At
  1676.             fmul    dword ptr [edx+13*4]    ;B3 A3 Bt At
  1677.  
  1678.             fld        dword ptr [esi+14*4]    ;x3 B2 A2 Bt At
  1679.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1680.             faddp    st(4),st                ;B2 x3 Bt At
  1681.             fsubp    st(2),st                ;x3 Bt At
  1682.             fmul    dword ptr [ecx+ 1*4]    ;A3 Bt At
  1683.             fld        dword ptr [esi+14*4]    ;x3 A3 Bt At
  1684.             fmul    dword ptr [edx+14*4]    ;B3 A3 Bt At
  1685.  
  1686.             fld        dword ptr [esi+15*4]    ;xF BE AE Bt At
  1687.             fxch    st(2)                    ;AE BE xF Bt At
  1688.             faddp    st(4),st                ;BE xF Bt At
  1689.             faddp    st(2),st                ;xF Bt At
  1690.             fmul    dword ptr [ecx+ 0*4]    ;AF Bt At
  1691.             fld        dword ptr [esi+15*4]    ;xF AF Bt At
  1692.             fmul    dword ptr [edx+15*4]    ;BF AF Bt At
  1693.  
  1694.             add        ecx,32*4
  1695.             add        edx,32*4
  1696.             sub        esi,16*4
  1697.  
  1698.             fsubp    st(2),st                ;AF Bt At
  1699.             faddp    st(2),st                ;Bt At
  1700.             fchs
  1701.             fistp    dword ptr [esp+0]        ;[esp+0] = outf3
  1702.             fistp    dword ptr [esp+4]        ;[esp+4] = outf1
  1703.  
  1704.             mov        eax,[esp+4]
  1705.             cmp        eax,-32768
  1706.             jge        div0_noclip1low
  1707.             mov        eax,-32768
  1708. div0_noclip1low:
  1709.             cmp        eax,32767
  1710.             jle        div0_noclip1high
  1711.             mov        eax,32767
  1712. div0_noclip1high:
  1713.             mov        [edi],ax
  1714.             mov        eax,[esp+0]
  1715.             cmp        eax,-32768
  1716.             jge        div0_noclip2low
  1717.             mov        eax,-32768
  1718. div0_noclip2low:
  1719.             cmp        eax,32767
  1720.             jle        div0_noclip2high
  1721.             mov        eax,32767
  1722. div0_noclip2high:
  1723.             mov        [ebx],ax
  1724.             nop
  1725.  
  1726.             add        ebx,2
  1727.             sub        edi,2
  1728.  
  1729.             dec        ebp
  1730.             jne        div0_loop
  1731.             pop        eax
  1732.             pop        eax
  1733.             pop        ebp
  1734.  
  1735.             pop        edi
  1736.             mov        ebx,esi
  1737.             pop        esi
  1738. ;            mov        window,ecx
  1739. ;            mov        window2,edx
  1740. ;            mov        u_ptr,ebx
  1741.         };
  1742. #else
  1743.         for (i = 1; i < 16; i++) {
  1744.             sum1 = 0.0F;
  1745.             sum2 = 0.0F;
  1746.  
  1747.             window = &wincoef[i][16-vb_ptr];
  1748.             window2 = &wincoef[i][vb_ptr];
  1749.  
  1750.             si = 256-i*16;
  1751.  
  1752.             sum1 -= window [ 0] * vbuf[si+ 0];
  1753.             sum2 += window2[15] * vbuf[si+ 0];
  1754.             sum1 += window [ 1] * vbuf[si+ 1];
  1755.             sum2 += window2[14] * vbuf[si+ 1];
  1756.             sum1 -= window [ 2] * vbuf[si+ 2];
  1757.             sum2 += window2[13] * vbuf[si+ 2];
  1758.             sum1 += window [ 3] * vbuf[si+ 3];
  1759.             sum2 += window2[12] * vbuf[si+ 3];
  1760.             sum1 -= window [ 4] * vbuf[si+ 4];
  1761.             sum2 += window2[11] * vbuf[si+ 4];
  1762.             sum1 += window [ 5] * vbuf[si+ 5];
  1763.             sum2 += window2[10] * vbuf[si+ 5];
  1764.             sum1 -= window [ 6] * vbuf[si+ 6];
  1765.             sum2 += window2[ 9] * vbuf[si+ 6];
  1766.             sum1 += window [ 7] * vbuf[si+ 7];
  1767.             sum2 += window2[ 8] * vbuf[si+ 7];
  1768.             sum1 -= window [ 8] * vbuf[si+ 8];
  1769.             sum2 += window2[ 7] * vbuf[si+ 8];
  1770.             sum1 += window [ 9] * vbuf[si+ 9];
  1771.             sum2 += window2[ 6] * vbuf[si+ 9];
  1772.             sum1 -= window [10] * vbuf[si+10];
  1773.             sum2 += window2[ 5] * vbuf[si+10];
  1774.             sum1 += window [11] * vbuf[si+11];
  1775.             sum2 += window2[ 4] * vbuf[si+11];
  1776.             sum1 -= window [12] * vbuf[si+12];
  1777.             sum2 += window2[ 3] * vbuf[si+12];
  1778.             sum1 += window [13] * vbuf[si+13];
  1779.             sum2 += window2[ 2] * vbuf[si+13];
  1780.             sum1 -= window [14] * vbuf[si+14];
  1781.             sum2 += window2[ 1] * vbuf[si+14];
  1782.             sum1 += window [15] * vbuf[si+15];
  1783.             sum2 += window2[ 0] * vbuf[si+15];
  1784.  
  1785.             tmp = float_to_long(sum1);
  1786.             if (tmp > 32767)
  1787.                 tmp = 32767;
  1788.             else if (tmp < -32768)
  1789.                 tmp = -32768;
  1790.  
  1791.             pcm[i] = tmp;
  1792.  
  1793.  
  1794.  
  1795.             tmp = float_to_long(sum2);
  1796.             if (tmp > 32767)
  1797.                 tmp = 32767;
  1798.             else if (tmp < -32768)
  1799.                 tmp = -32768;
  1800.  
  1801.             pcm[32-i] = tmp;
  1802.  
  1803.         }
  1804. #endif
  1805.     } else {
  1806. #ifdef USE_ASM
  1807.         window = &wincoef[1][16-vb_ptr];
  1808.         window2 = &wincoef[1][vb_ptr];
  1809.  
  1810.         const float *vbuf2 = vbuf+272;
  1811.  
  1812.         __asm {
  1813.             push    esi
  1814.             push    vbuf2
  1815.             mov        edx,window
  1816.             mov        ecx,window2
  1817.             mov        ebx,pcm
  1818.             pop        esi
  1819.             push    edi
  1820.             mov        edi,ebx
  1821.             add        ebx,2
  1822.             add        edi,62
  1823.             cmp        eax,2
  1824.             push    ebp
  1825.             push    0
  1826.             push    0
  1827.             mov        ebp,15
  1828. div1_loop:
  1829.             fld        dword ptr [esi+ 0*4]    ;x0
  1830.             fmul    dword ptr [ecx+15*4]    ;A0
  1831.             fld        dword ptr [esi+ 0*4]    ;x0 A0
  1832.             fmul    dword ptr [edx+ 0*4]    ;B0 A0
  1833.             fld        dword ptr [esi+ 1*4]    ;x1 B0 A0
  1834.             fmul    dword ptr [ecx+14*4]    ;A1 B0 A0
  1835.             fld        dword ptr [esi+ 1*4]    ;x1 A1 B0 A0
  1836.             fmul    dword ptr [edx+ 1*4]    ;B1 A1 B0 A0
  1837.             fld        dword ptr [esi+ 2*4]    ;x2 B1 A1 B0 A0
  1838.             fxch    st(2)                    ;A1 B1 x2 B0 A0
  1839.             faddp    st(4),st                ;B1 x2 B0 At
  1840.             fsubp    st(2),st                ;x2 Bt At
  1841.             fmul    dword ptr [ecx+13*4]    ;A2 Bt At
  1842.             fld        dword ptr [esi+ 2*4]    ;x2 A2 Bt At
  1843.             fmul    dword ptr [edx+ 2*4]    ;B2 A2 Bt At
  1844.  
  1845.             fld        dword ptr [esi+ 3*4]    ;x3 B2 A2 Bt At
  1846.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1847.             faddp    st(4),st                ;B2 x3 Bt At
  1848.             faddp    st(2),st                ;x3 Bt At
  1849.             fmul    dword ptr [ecx+12*4]    ;A3 Bt At
  1850.             fld        dword ptr [esi+ 3*4]    ;x3 A3 Bt At
  1851.             fmul    dword ptr [edx+ 3*4]    ;B3 A3 Bt At
  1852.  
  1853.             fld        dword ptr [esi+ 4*4]    ;x3 B2 A2 Bt At
  1854.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1855.             faddp    st(4),st                ;B2 x3 Bt At
  1856.             fsubp    st(2),st                ;x3 Bt At
  1857.             fmul    dword ptr [ecx+11*4]    ;A3 Bt At
  1858.             fld        dword ptr [esi+ 4*4]    ;x3 A3 Bt At
  1859.             fmul    dword ptr [edx+ 4*4]    ;B3 A3 Bt At
  1860.  
  1861.             fld        dword ptr [esi+ 5*4]    ;x3 B2 A2 Bt At
  1862.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1863.             faddp    st(4),st                ;B2 x3 Bt At
  1864.             faddp    st(2),st                ;x3 Bt At
  1865.             fmul    dword ptr [ecx+10*4]    ;A3 Bt At
  1866.             fld        dword ptr [esi+ 5*4]    ;x3 A3 Bt At
  1867.             fmul    dword ptr [edx+ 5*4]    ;B3 A3 Bt At
  1868.  
  1869.             fld        dword ptr [esi+ 6*4]    ;x3 B2 A2 Bt At
  1870.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1871.             faddp    st(4),st                ;B2 x3 Bt At
  1872.             fsubp    st(2),st                ;x3 Bt At
  1873.             fmul    dword ptr [ecx+ 9*4]    ;A3 Bt At
  1874.             fld        dword ptr [esi+ 6*4]    ;x3 A3 Bt At
  1875.             fmul    dword ptr [edx+ 6*4]    ;B3 A3 Bt At
  1876.  
  1877.             fld        dword ptr [esi+ 7*4]    ;x3 B2 A2 Bt At
  1878.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1879.             faddp    st(4),st                ;B2 x3 Bt At
  1880.             faddp    st(2),st                ;x3 Bt At
  1881.             fmul    dword ptr [ecx+ 8*4]    ;A3 Bt At
  1882.             fld        dword ptr [esi+ 7*4]    ;x3 A3 Bt At
  1883.             fmul    dword ptr [edx+ 7*4]    ;B3 A3 Bt At
  1884.  
  1885.             fld        dword ptr [esi+ 8*4]    ;x3 B2 A2 Bt At
  1886.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1887.             faddp    st(4),st                ;B2 x3 Bt At
  1888.             fsubp    st(2),st                ;x3 Bt At
  1889.             fmul    dword ptr [ecx+ 7*4]    ;A3 Bt At
  1890.             fld        dword ptr [esi+ 8*4]    ;x3 A3 Bt At
  1891.             fmul    dword ptr [edx+ 8*4]    ;B3 A3 Bt At
  1892.  
  1893.             fld        dword ptr [esi+ 9*4]    ;x3 B2 A2 Bt At
  1894.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1895.             faddp    st(4),st                ;B2 x3 Bt At
  1896.             faddp    st(2),st                ;x3 Bt At
  1897.             fmul    dword ptr [ecx+ 6*4]    ;A3 Bt At
  1898.             fld        dword ptr [esi+ 9*4]    ;x3 A3 Bt At
  1899.             fmul    dword ptr [edx+ 9*4]    ;B3 A3 Bt At
  1900.  
  1901.             fld        dword ptr [esi+10*4]    ;x3 B2 A2 Bt At
  1902.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1903.             faddp    st(4),st                ;B2 x3 Bt At
  1904.             fsubp    st(2),st                ;x3 Bt At
  1905.             fmul    dword ptr [ecx+ 5*4]    ;A3 Bt At
  1906.             fld        dword ptr [esi+10*4]    ;x3 A3 Bt At
  1907.             fmul    dword ptr [edx+10*4]    ;B3 A3 Bt At
  1908.  
  1909.             fld        dword ptr [esi+11*4]    ;x3 B2 A2 Bt At
  1910.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1911.             faddp    st(4),st                ;B2 x3 Bt At
  1912.             faddp    st(2),st                ;x3 Bt At
  1913.             fmul    dword ptr [ecx+ 4*4]    ;A3 Bt At
  1914.             fld        dword ptr [esi+11*4]    ;x3 A3 Bt At
  1915.             fmul    dword ptr [edx+11*4]    ;B3 A3 Bt At
  1916.  
  1917.             fld        dword ptr [esi+12*4]    ;x3 B2 A2 Bt At
  1918.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1919.             faddp    st(4),st                ;B2 x3 Bt At
  1920.             fsubp    st(2),st                ;x3 Bt At
  1921.             fmul    dword ptr [ecx+ 3*4]    ;A3 Bt At
  1922.             fld        dword ptr [esi+12*4]    ;x3 A3 Bt At
  1923.             fmul    dword ptr [edx+12*4]    ;B3 A3 Bt At
  1924.  
  1925.             fld        dword ptr [esi+13*4]    ;x3 B2 A2 Bt At
  1926.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1927.             faddp    st(4),st                ;B2 x3 Bt At
  1928.             faddp    st(2),st                ;x3 Bt At
  1929.             fmul    dword ptr [ecx+ 2*4]    ;A3 Bt At
  1930.             fld        dword ptr [esi+13*4]    ;x3 A3 Bt At
  1931.             fmul    dword ptr [edx+13*4]    ;B3 A3 Bt At
  1932.  
  1933.             fld        dword ptr [esi+14*4]    ;x3 B2 A2 Bt At
  1934.             fxch    st(2)                    ;A2 B2 x3 Bt At
  1935.             faddp    st(4),st                ;B2 x3 Bt At
  1936.             fsubp    st(2),st                ;x3 Bt At
  1937.             fmul    dword ptr [ecx+ 1*4]    ;A3 Bt At
  1938.             fld        dword ptr [esi+14*4]    ;x3 A3 Bt At
  1939.             fmul    dword ptr [edx+14*4]    ;B3 A3 Bt At
  1940.  
  1941.             fld        dword ptr [esi+15*4]    ;xF BE AE Bt At
  1942.             fxch    st(2)                    ;AE BE xF Bt At
  1943.             faddp    st(4),st                ;BE xF Bt At
  1944.             faddp    st(2),st                ;xF Bt At
  1945.             fmul    dword ptr [ecx+ 0*4]    ;AF Bt At
  1946.             fld        dword ptr [esi+15*4]    ;xF AF Bt At
  1947.             fmul    dword ptr [edx+15*4]    ;BF AF Bt At
  1948.  
  1949.             add        ecx,32*4
  1950.             add        edx,32*4
  1951.             add        esi,16*4
  1952.  
  1953.             fsubp    st(2),st                ;AF Bt At
  1954.             faddp    st(2),st                ;Bt At
  1955.             fistp    dword ptr [esp+0]        ;[esp+0] = outf3
  1956.             fistp    dword ptr [esp+4]        ;[esp+4] = outf1
  1957.  
  1958.             mov        eax,[esp+0]
  1959.             cmp        eax,-32768
  1960.             jge        div1_noclip1low
  1961.             mov        eax,-32768
  1962. div1_noclip1low:
  1963.             cmp        eax,32767
  1964.             jle        div1_noclip1high
  1965.             mov        eax,32767
  1966. div1_noclip1high:
  1967.             mov        [ebx],ax
  1968.             mov        eax,[esp+4]
  1969.             cmp        eax,-32768
  1970.             jge        div1_noclip2low
  1971.             mov        eax,-32768
  1972. div1_noclip2low:
  1973.             cmp        eax,32767
  1974.             jle        div1_noclip2high
  1975.             mov        eax,32767
  1976. div1_noclip2high:
  1977.             mov        [edi],ax
  1978.             nop
  1979.  
  1980.             add        ebx,2
  1981.             sub        edi,2
  1982.  
  1983.             dec        ebp
  1984.             jne        div1_loop
  1985.             pop        eax
  1986.             pop        eax
  1987.             pop        ebp
  1988.  
  1989.             pop        edi
  1990.             mov        ebx,esi
  1991.             pop        esi
  1992. ;            mov        window,ecx
  1993. ;            mov        window2,edx
  1994. ;            mov        u_ptr,ebx
  1995.         };
  1996. #else
  1997.         for (i = 1; i < 16; i++) {
  1998.             sum1 = 0.0F;
  1999.             sum2 = 0.0F;
  2000.  
  2001.             window = &wincoef[i][16-vb_ptr];
  2002.             window2 = &wincoef[i][vb_ptr & 15];
  2003.  
  2004.             si = 256+i*16;
  2005.  
  2006.             sum1 += window [ 0] * vbuf[si+ 0];
  2007.             sum2 += window2[15] * vbuf[si+ 0];
  2008.             sum1 -= window [ 1] * vbuf[si+ 1];
  2009.             sum2 += window2[14] * vbuf[si+ 1];
  2010.             sum1 += window [ 2] * vbuf[si+ 2];
  2011.             sum2 += window2[13] * vbuf[si+ 2];
  2012.             sum1 -= window [ 3] * vbuf[si+ 3];
  2013.             sum2 += window2[12] * vbuf[si+ 3];
  2014.             sum1 += window [ 4] * vbuf[si+ 4];
  2015.             sum2 += window2[11] * vbuf[si+ 4];
  2016.             sum1 -= window [ 5] * vbuf[si+ 5];
  2017.             sum2 += window2[10] * vbuf[si+ 5];
  2018.             sum1 += window [ 6] * vbuf[si+ 6];
  2019.             sum2 += window2[ 9] * vbuf[si+ 6];
  2020.             sum1 -= window [ 7] * vbuf[si+ 7];
  2021.             sum2 += window2[ 8] * vbuf[si+ 7];
  2022.             sum1 += window [ 8] * vbuf[si+ 8];
  2023.             sum2 += window2[ 7] * vbuf[si+ 8];
  2024.             sum1 -= window [ 9] * vbuf[si+ 9];
  2025.             sum2 += window2[ 6] * vbuf[si+ 9];
  2026.             sum1 += window [10] * vbuf[si+10];
  2027.             sum2 += window2[ 5] * vbuf[si+10];
  2028.             sum1 -= window [11] * vbuf[si+11];
  2029.             sum2 += window2[ 4] * vbuf[si+11];
  2030.             sum1 += window [12] * vbuf[si+12];
  2031.             sum2 += window2[ 3] * vbuf[si+12];
  2032.             sum1 -= window [13] * vbuf[si+13];
  2033.             sum2 += window2[ 2] * vbuf[si+13];
  2034.             sum1 += window [14] * vbuf[si+14];
  2035.             sum2 += window2[ 1] * vbuf[si+14];
  2036.             sum1 -= window [15] * vbuf[si+15];
  2037.             sum2 += window2[ 0] * vbuf[si+15];
  2038.  
  2039.             tmp = float_to_long(sum1);
  2040.             if (tmp > 32767)
  2041.                 tmp = 32767;
  2042.             else if (tmp < -32768)
  2043.                 tmp = -32768;
  2044.  
  2045.             pcm[i] = tmp;
  2046.  
  2047.         
  2048.  
  2049.             tmp = float_to_long(sum2);
  2050.             if (tmp > 32767)
  2051.                 tmp = 32767;
  2052.             else if (tmp < -32768)
  2053.                 tmp = -32768;
  2054.  
  2055.             pcm[32-i] = tmp;
  2056.         
  2057.         }
  2058. #endif
  2059.     }
  2060.  
  2061.  
  2062.  
  2063.     /*--  special case --*/
  2064.     coef = 0;
  2065.     bx = (vb_ptr+1)&15;
  2066.  
  2067.     sum1 = 0.0F;
  2068.  
  2069.     for (j = 0; j < 8; j++) {
  2070.         sum1 += wincoef2[coef++] * vbuf[bx];    bx = (bx+2)&15;
  2071.     }
  2072.  
  2073.     tmp = (long)sum1;
  2074.  
  2075.     if (tmp > 32767)
  2076.         tmp = 32767;
  2077.     else if (tmp < -32768)
  2078.         tmp = -32768;
  2079.     pcm[16] = tmp;
  2080.  
  2081. }
  2082.  
  2083. static bool pp_init_flag = true;
  2084.  
  2085. static void pp_init() {
  2086.     int i,j;
  2087.  
  2088.     pp_init_flag = false;
  2089.  
  2090.     for(i=0; i<16; i++)
  2091.         for(j=0; j<16; j++)
  2092.             wincoef[i][j+16] = wincoef[i][j];
  2093. }
  2094.  
  2095. void AMPDecoder::polyphase(float *band_l, float *band_r, short *samples, bool invert_odd) {
  2096.     if (pp_init_flag)
  2097.         pp_init();
  2098.     
  2099.     fdct32(band_l, window[0] + winptr, !!(winptr & 1), invert_odd);
  2100.     if (band_r) {
  2101.         fdct32(band_r, window[1] + winptr, !!(winptr & 1), invert_odd);
  2102. //        window_dual(window[0], winptr, samples);
  2103. //        window_dual(window[1], winptr, samples + 1);
  2104.         window_dual(window, winptr, samples);
  2105.     } else
  2106.         window_mono(window[0], winptr, samples);
  2107.  
  2108.     winptr = (winptr - 1) & 15;
  2109. }
  2110.  
  2111. #if 0
  2112. void AMPDecoder::polyphase_single(float *band, int ch, short *samples) {
  2113.     if (pp_init_flag)
  2114.         pp_init();
  2115.  
  2116.     fdct32(band, window[ch] + winptr, !!(winptr&1), false);
  2117.     window_dual(window[ch], winptr, samples);
  2118.  
  2119.     winptr = (winptr - 1) & 15;
  2120. }
  2121. #endif
  2122.  
  2123. void AMPDecoder::polyphase_retract(int amount) {
  2124.     winptr = (winptr +
  2125.         amount) & 15;
  2126. }
  2127.